jesseduffield.lazygit/pkg/commands
Stefan Haller 8fbc70bf84 Fix staging only some lines of a block of consecutive changes
This fixes the problem; a consequence of this change is that given the following
scenario:

@@ -1,3 +1,3 @@
 1
-2
+2b
 3

staging only the line `+2b` will put it *before* the unchanged `2` line, rather
than after it as you might expect (the changed unit tests demonstrate this).
Since this should be a pretty uncommon scenario, I guess it is an ok compromise.

As you can see in the changed tests, while the behavior of what gets staged is
fixed now, it doesn't always correctly select the next line to stage. We'll
address this in the next commit.
2026-03-19 16:57:53 +01:00
..
git_commands Add backward cycling support for all branches log view 2026-03-08 17:06:17 +01:00
git_config Enable errorlint linter, and fix warnings 2025-06-30 18:30:11 +02:00
hosting_service feat: add Codeberg as a supported git hosting service 2025-12-21 14:10:59 +01:00
models Show branch name and detached HEAD in worktrees tab 2026-03-08 12:51:46 +01:00
oscommands Suppress output from background fetch 2025-11-15 18:27:18 +01:00
patch Fix staging only some lines of a block of consecutive changes 2026-03-19 16:57:53 +01:00
testdata Support opening lazygit in a submodule 2019-05-12 17:59:49 +10:00
git.go Add PagerConfig 2025-10-14 12:17:13 +02:00
git_cmd_obj_builder.go Remove ICmdObj interface 2025-05-01 15:21:37 +02:00
git_cmd_obj_runner.go Enable intrange linter, and fix warnings 2025-06-30 18:30:11 +02:00