1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/pkg/gui/patch_exploring
Stefan Haller 8f164f7bc5 Stop cycling hunks when reaching the end
Previously, when pressing right-arrow when the cursor is already in the last
hunk, it would jump back to the beginning of that hunk. This can be confusing if
the hunk is long, maybe the start of the hunk is already scrolled off the top of
the window, and then pressing right-arrow actually scrolls *backwards*, which is
counter-intuitive. It's better to do nothing in this case.

Same for left-arrow when the cursor is already in the first hunk, although here
the problem is not so severe (unless diff context was increased by a huge
amount, and the start of the first hunk is scrolled off the bottom of the
window).
2023-08-15 11:40:40 +02:00
..
focus_test.go If selected line is outside, move it to the middle of the view 2023-08-15 11:40:40 +02:00
focus.go If selected line is outside, move it to the middle of the view 2023-08-15 11:40:40 +02:00
state.go Stop cycling hunks when reaching the end 2023-08-15 11:40:40 +02:00