You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incomplete selected line highlight in diff pane #6117
Tested on linux mint 22.3 and debian trixie.
No custom config.yml.
Same issue on building from latest with go install github.com/jesseduffield/lazygit@latest.
Reacted by net-solution, Marie-Helene Burle, alexnlarsen, John Rey Rabosa, psauxwwf, Simon Abbott and kevin-alt-acct
Is there any way to set it back to the previous behavior or at least imitate it with git delta? I have some vision problems and the previous behavior's complete line highlighting made it much easier to track hunks while the new method makes it so much harder.
I have some vision problems and the previous behavior's complete line highlighting made it much easier to track hunks while the new method makes it so much harder.
I'm sorry to hear that. Can you try if you can improve it by tweaking the selection color? Try something like
gui:
theme:
selectedLineBgColor:
- "#3377cc"
I'm not sure what you mean by "imitate it with git delta". If you use delta, rather than the raw git diff, then selecting the entire line is simply not an option, as the screen shot in #6098 (comment) shows. And when people tell me "but I don't use delta, so for me it would be fine to select the whole line", I can only say you are missing out. Try delta, it really improves the lazygit experience considerably; that's why I insist on this so much.
I have some vision problems and the previous behavior's complete line highlighting made it much easier to track hunks while the new method makes it so much harder.
I'm sorry to hear that. Can you try if you can improve it by tweaking the selection color? Try something like
gui:
theme:
selectedLineBgColor:
- "#3377cc"
I'm not sure what you mean by "imitate it with git delta". If you use delta, rather than the raw git diff, then selecting the entire line is simply not an option, as the screen shot in #6098 (comment) shows. And when people tell me "but I don't use delta, so for me it would be fine to select the whole line", I can only say you are missing out. Try delta, it really improves the lazygit experience considerably; that's why I insist on this so much.
I've already got a more visible color selected using gui.theme.selectedLineByColorand am already using delta; in fact I've been using delta since before this change.
The problem is two-fold. First (and this is probably more of a bug), the sidebar highlight overlaps line numbers when setting line-numbers = true in delta's config. This makes the sidebar highlight visually confusing even without considering whole line highlighting because it conflicts with delta's line-number color settings. The number of colored spaces is hardcoded 2 and can't be changed.
Second is that the replacement is fundamentally not the same as the previous full line highlight. If I could use an analogy, the current behavior is like using a finger to point to a line you're reading in a book vs highlighting the line. The behaviors aren't the same and serve different purposes in terms of visually orienting the user to the change.
I understand that the new setting works for you and that's awesome so I'm not expecting you'll change this back but it is worth knowing that this change is more of an accessibility issue and should probably be treated as one by allowing the user to set the behavior rather than have it be a take-it-or-leave-it situation.
First (and this is probably more of a bug), the sidebar highlight overlaps line numbers when setting line-numbers = true in delta's config.
I thought about that; it would be nicer if the highlight would be to the right of the line numbers, where the diff actually starts. Trouble is, this would require an extension to the OSC 1717 protocol so that the diff renderer can tell lazygit where it should put the highlight; that's a lot of work, and I'm not sure it's worth it. But it would allow showing the highlight at the left edge of the second column in --side-by-side mode too.
One question about line numbers: are you using them only so that you can use hyperlinks to jump to the editor? Just in case you missed that you can also do that now by alt-clicking anywhere on the line. Of course, if you like seeing line numbers for other reasons, then the problem is still there.
but it is worth knowing that this change is more of an accessibility issue
Yes, I understand this. The problem is that I don't know a good solution; going back to highlighting the whole line simply doesn't work, since the selection changes the background color. For delta, we'd probably have to change the foreground color instead, or something like that; but I'm not sure this would look good. If you have a good suggestion here, I'm all ears; I'm not super happy with the narrow selection bar either, I just haven't found anything better.
I am having similar issues. I also find the highlight too subtle (and sorry to say, the highlight on both sides of the diff quite ugly).
I am now trying out delta thanks to the discussion in this issue, which I am thankful for. It is quite nice! However, it doesn't address the usability issues. I am experimenting with my theme to make it more readable, but it is difficult to find a background highlight which looks good in both the diff viewer and the other windows. Perhaps they should be separately configurable?
It doesn't look like delta is using text attributes such as bold, underline, italics, etc. I wonder if that is an option?
I personally don't use delta or any other other diff renderer–I actually prefer the default git diff view, it just makes more sense to my brain–and with the default git diff the two character highlight is hard to use. While I am all for increasing compatibility with other tools, I think it is important to recognize that while lazygit and delta work well together, at the end of the day lazygit is a git client, and should work well out-of-the-box with the default tools git gives, not require yet another tool for optimal performance. Having only 4 characters of highlight makes it hard for me to tell which line are actually being selected, especially in wide windows, which I usually use.
I am strongly in favor of bringing back the full-width highlight, either universally or per-tool. Since I only have the one tool, the default git diff, those are the same to me.
Some ways to do this I have thought of:
Have a single global setting -- doesn't play nice with different renderer styles, as noted above
Have per-tool overrides -- unnecessary complicated to configure for those of us who just use the default git diff
Combine 1 + 2: global default + per-tool overrides -- my preference; allows for easy configuration, while still letting power users have different settings for each tool
Combine 1 + 2, and set sensible defaults -- taking option 3 a step further, you can set sensible per-tool defaults (e.g. git diff uses full-width, delta uses two characters, etc.), while still letting users override that setting as they desire. Ideally the global default will still override these defaults, so users can trivially set a uniform behavior should they desire that.
I think option 4 will provide the best out-of-the-box experience, but will also understandably be the most work, but I personally will be happy with any of the 4.
Activity
stefanhaller commentedon Oct 12, 2026
This is intentional, and has been discussed here a few times. See for example #6098.
davepgreene commentedon Oct 13, 2026
Is there any way to set it back to the previous behavior or at least imitate it with git delta? I have some vision problems and the previous behavior's complete line highlighting made it much easier to track hunks while the new method makes it so much harder.
stefanhaller commentedon Oct 16, 2026
I'm sorry to hear that. Can you try if you can improve it by tweaking the selection color? Try something like
I'm not sure what you mean by "imitate it with git delta". If you use delta, rather than the raw git diff, then selecting the entire line is simply not an option, as the screen shot in #6098 (comment) shows. And when people tell me "but I don't use delta, so for me it would be fine to select the whole line", I can only say you are missing out. Try delta, it really improves the lazygit experience considerably; that's why I insist on this so much.
davepgreene commentedon Oct 16, 2026
I've already got a more visible color selected using
gui.theme.selectedLineByColorand am already using delta; in fact I've been using delta since before this change.The problem is two-fold. First (and this is probably more of a bug), the sidebar highlight overlaps line numbers when setting
line-numbers = truein delta's config. This makes the sidebar highlight visually confusing even without considering whole line highlighting because it conflicts with delta's line-number color settings. The number of colored spaces is hardcoded 2 and can't be changed.Second is that the replacement is fundamentally not the same as the previous full line highlight. If I could use an analogy, the current behavior is like using a finger to point to a line you're reading in a book vs highlighting the line. The behaviors aren't the same and serve different purposes in terms of visually orienting the user to the change.
I understand that the new setting works for you and that's awesome so I'm not expecting you'll change this back but it is worth knowing that this change is more of an accessibility issue and should probably be treated as one by allowing the user to set the behavior rather than have it be a take-it-or-leave-it situation.
stefanhaller commentedon Oct 16, 2026
I thought about that; it would be nicer if the highlight would be to the right of the line numbers, where the diff actually starts. Trouble is, this would require an extension to the OSC 1717 protocol so that the diff renderer can tell lazygit where it should put the highlight; that's a lot of work, and I'm not sure it's worth it. But it would allow showing the highlight at the left edge of the second column in
--side-by-sidemode too.One question about line numbers: are you using them only so that you can use hyperlinks to jump to the editor? Just in case you missed that you can also do that now by alt-clicking anywhere on the line. Of course, if you like seeing line numbers for other reasons, then the problem is still there.
Yes, I understand this. The problem is that I don't know a good solution; going back to highlighting the whole line simply doesn't work, since the selection changes the background color. For delta, we'd probably have to change the foreground color instead, or something like that; but I'm not sure this would look good. If you have a good suggestion here, I'm all ears; I'm not super happy with the narrow selection bar either, I just haven't found anything better.
Operdies commentedon Oct 16, 2026
I am having similar issues. I also find the highlight too subtle (and sorry to say, the highlight on both sides of the diff quite ugly).
I am now trying out delta thanks to the discussion in this issue, which I am thankful for. It is quite nice! However, it doesn't address the usability issues. I am experimenting with my theme to make it more readable, but it is difficult to find a background highlight which looks good in both the diff viewer and the other windows. Perhaps they should be separately configurable?
It doesn't look like delta is using text attributes such as bold, underline, italics, etc. I wonder if that is an option?
simon-abbott commentedon Oct 29, 2026
I personally don't use delta or any other other diff renderer–I actually prefer the default git diff view, it just makes more sense to my brain–and with the default git diff the two character highlight is hard to use. While I am all for increasing compatibility with other tools, I think it is important to recognize that while lazygit and delta work well together, at the end of the day lazygit is a git client, and should work well out-of-the-box with the default tools git gives, not require yet another tool for optimal performance. Having only 4 characters of highlight makes it hard for me to tell which line are actually being selected, especially in wide windows, which I usually use.
I am strongly in favor of bringing back the full-width highlight, either universally or per-tool. Since I only have the one tool, the default git diff, those are the same to me.
Some ways to do this I have thought of:
I think option 4 will provide the best out-of-the-box experience, but will also understandably be the most work, but I personally will be happy with any of the 4.