jesseduffield.lazygit/pkg/integration/tests/patch_building
Stefan Haller ece5f0fb66 Advance to the next hunk after toggling one into a custom patch
Staging a hunk from the focused main view advances the selection to the next
hunk, because staging removes the acted-on lines from the diff so the preserved
change-line ordinal lands on the next change. Toggling a hunk into a custom
patch left the selection sitting on the just-toggled hunk instead — the toggle
doesn't change the diff (only the inclusion set), so the same ordinal lands back
where it was, and you had to navigate by hand to build a patch hunk by hunk.

Give the toggle the same feel by advancing the reveal ordinal past the toggled
change lines (RevealSelectionAfterStaging gains an advanceBy arg, fed the toggled
change-line count). Staging and removal still pass 0 (their lines are consumed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-08 12:59:00 +02:00
..
apply.go Always render diffs to the main/secondary context pair, even for files 2025-04-21 18:03:18 +02:00
apply_in_reverse.go Always render diffs to the main/secondary context pair, even for files 2025-04-21 18:03:18 +02:00
apply_in_reverse_with_conflict.go Always render diffs to the main/secondary context pair, even for files 2025-04-21 18:03:18 +02:00
apply_with_modified_file_conflict.go Stage affected unstaged files when applying or reverting a patch 2025-07-02 16:19:06 +02:00
apply_with_modified_file_no_conflict.go Stage affected unstaged files when applying or reverting a patch 2025-07-02 16:19:06 +02:00
build_from_main_view.go Advance to the next hunk after toggling one into a custom patch 2026-08-08 12:59:00 +02:00
build_from_main_view_with_unsupported_pager.go Extend the raw-diff fallback to the commit/stash/patch-building panels 2026-08-08 12:59:00 +02:00
build_from_whole_commit_main_view.go Advance to the next hunk after toggling one into a custom patch 2026-08-08 12:59:00 +02:00
build_multi_file_from_whole_commit_main_view.go Advance to the next hunk after toggling one into a custom patch 2026-08-08 12:59:00 +02:00
copy_renamed_file_diff.go Show renamed files in the custom patch builder 2026-07-04 13:05:09 +02:00
discard_lines_from_commit.go Allow discarding lines from patch directly 2026-03-07 20:47:20 +11:00
discard_lines_from_commit_main_view.go Discard the selected diff line(s) from the focused main view 2026-08-08 12:59:00 +02:00
edit_line_in_patch_building_panel.go Adjust line number for working copy when editing a line 2025-01-07 17:46:51 +01:00
keep_selection_after_moving_patch_out_main_view.go Advance to the next hunk after toggling one into a custom patch 2026-08-08 12:59:00 +02:00
move_range_to_index.go Always render diffs to the main/secondary context pair, even for files 2025-04-21 18:03:18 +02:00
move_to_earlier_commit.go Remove obsolete git version restrictions 2025-07-09 12:18:57 +02:00
move_to_earlier_commit_from_added_file.go Mention which command is continued in PromptToContinueRebase 2025-04-20 15:53:17 +02:00
move_to_index.go Always render diffs to the main/secondary context pair, even for files 2025-04-21 18:03:18 +02:00
move_to_index_from_added_file_with_conflict.go Mention which command is continued in PromptToContinueRebase 2025-04-20 15:53:17 +02:00
move_to_index_part_of_adjacent_added_lines.go Bump gocui 2025-01-07 17:34:30 +01:00
move_to_index_partial.go Enable hunk staging mode by default 2025-08-01 10:35:16 +02:00
move_to_index_with_conflict.go Mention which command is continued in PromptToContinueRebase 2025-04-20 15:53:17 +02:00
move_to_index_with_modified_file.go Drop stash when successfully unstashing files after moving patch to index 2025-07-02 16:19:06 +02:00
move_to_index_works_even_if_noprefix_is_set.go Always render diffs to the main/secondary context pair, even for files 2025-04-21 18:03:18 +02:00
move_to_later_commit.go Add a root item ("/") if files at top level have changed 2025-03-21 08:04:58 +01:00
move_to_later_commit_partial_hunk.go Add a root item ("/") if files at top level have changed 2025-03-21 08:04:58 +01:00
move_to_new_commit.go Add custom patch command "Move patch into new commit before the original commit" 2025-05-10 18:57:28 +02:00
move_to_new_commit_before.go Remove obsolete git version restrictions 2025-07-09 12:18:57 +02:00
move_to_new_commit_from_added_file.go Add custom patch command "Move patch into new commit before the original commit" 2025-05-10 18:57:28 +02:00
move_to_new_commit_from_deleted_file.go Add custom patch command "Move patch into new commit before the original commit" 2025-05-10 18:57:28 +02:00
move_to_new_commit_in_last_commit_of_stacked_branch.go Make integration tests using commits more robust 2026-07-09 11:56:27 +02:00
move_to_new_commit_partial_hunk.go Add custom patch command "Move patch into new commit before the original commit" 2025-05-10 18:57:28 +02:00
remove_from_commit.go Always render diffs to the main/secondary context pair, even for files 2025-04-21 18:03:18 +02:00
remove_lines_from_main_view_secondary.go Make the patch-building secondary pane's space remove the right lines, disable its discard 2026-08-08 12:59:00 +02:00
remove_parts_of_added_file.go Fix custom patch operations on added files 2024-06-23 12:40:31 +02:00
rename_similarity_threshold_change.go Show renamed files in the custom patch builder 2026-07-04 13:05:09 +02:00
renamed_file_partial.go Show renamed files in the custom patch builder 2026-07-04 13:05:09 +02:00
renamed_file_whole.go Show renamed files in the custom patch builder 2026-07-04 13:05:09 +02:00
reset_patch_built_from_main_view.go Build a custom patch from the commits / sub-commits / stash main views 2026-08-08 12:59:00 +02:00
reset_with_escape.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
select_all_files.go Add a root item ("/") if files at top level have changed 2025-03-21 08:04:58 +01:00
select_direcories_sharing_prefix.go Fix multi-selection of files with common prefix not working in commit files panel 2026-07-28 18:14:58 +02:00
specific_selection.go Render the custom-patch secondary pane through the pager, via a real git diff 2026-08-08 12:59:00 +02:00
start_new_patch.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
toggle_directory.go Filter file views rather than search 2026-03-07 20:04:31 +01:00
toggle_range.go Add a root item ("/") if files at top level have changed 2025-03-21 08:04:58 +01:00