Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

align_view_top doesn't work with goto_definition #13230

Open
evanrichter opened this issue Mar 30, 2025 · 0 comments
Open

align_view_top doesn't work with goto_definition #13230

evanrichter opened this issue Mar 30, 2025 · 0 comments
Labels
C-bug Category: This is a bug

Comments

@evanrichter
Copy link
Contributor

evanrichter commented Mar 30, 2025

Summary

I want to override gd (goto_definition) such that after I jump somewhere, the cursor and definition are near the top of the viewport. I have tried the following:

[keys.normal.g]
d = ["goto_definition", "align_view_top"]

I expect this command sequence to goto_definition (it does), then shift the view with align_view_top in the new or existing buffer (it does not).

What happens instead depends on whether goto_definition opens a new buffer or not:

  • definition opens a new buffer: the previous buffer gets the align_view_top effect
  • definition is in the same buffer: align_view_top is not applied

Platform

macOS

Terminal Emulator

wezterm

Installation Method

flake

Helix Version

helix 25.01.1 (e148d8b)

@evanrichter evanrichter added the C-bug Category: This is a bug label Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

1 participant