Skip to content

Select hunk (a) broken #4470

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

Open
xuyangyuio opened this issue Apr 9, 2025 · 4 comments
Open

Select hunk (a) broken #4470

xuyangyuio opened this issue Apr 9, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@xuyangyuio
Copy link

xuyangyuio commented Apr 9, 2025

In the "Unstaged changes" pane, press a to select hunk, but the hunk is not correctly selected.

@xuyangyuio xuyangyuio added the bug Something isn't working label Apr 9, 2025
@ChrisMcD1
Copy link
Contributor

Can you give some more details about what steps you are taking to produce this? Particularly if you have configured a non-default pager.

Here is me prior to pressing a:

Image

and after pressing a

Image

which is expected behavior. I can then click <space> to confirm that I want to stage that hunk.

@xuyangyuio
Copy link
Author

I use delta, in my config: pager: delta --paging=never --line-numbers --hyperlinks --hyperlinks-file-link-format="lazygit-edit://{path}:{line}"

The hunk is selected, but partial like:

Image

@stefanhaller
Copy link
Collaborator

I've seen this too. I think it happens for longer hunks, where the view needs to scroll so that the end of the hunk becomes visible. As far as I remember, this is only a visual problem, pressing space to stage the hunk should still work fine (not 100% sure on that).

I'll have a closer look when I find some time.

@wiraki
Copy link

wiraki commented May 6, 2025

I can confirm I see the same behavior. Indeed it seems to only be a visual bug for longer hunks, but staging still works fine. However, it is sometimes difficult to understand what will be considered as a hunk and what not due to this.

I imagine this has nothing to do with the custom pager since it is currently not used in the staging mode, but just in case, I am also using delta as the custom pager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants