1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-10 11:10:18 +02:00
lazygit/pkg/commands/patch
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
..
format.go refactor patch code 2023-03-19 16:30:39 +11:00
hunk.go refactor patch code 2023-03-19 16:30:39 +11:00
parse.go refactor patch code 2023-03-19 16:30:39 +11:00
patch_builder.go Standardise on using lo for slice functions 2023-07-30 18:51:23 +10:00
patch_line.go refactor patch code 2023-03-19 16:30:39 +11:00
patch_test.go Fix bug in LineNumberOfLine 2023-08-10 07:22:42 +02:00
patch.go Stop cycling hunks when reaching the end 2023-08-15 11:40:40 +02:00
transform.go refactor patch code 2023-03-19 16:30:39 +11:00