mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-06 22:33:07 +02:00
Keep the same line selected after squashing fixup commits
This uses a bit of a heuristic that is hopefully correct most of the time.
This commit is contained in:
@ -46,10 +46,9 @@ var SquashFixupsAbove = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
}).
|
||||
Lines(
|
||||
Contains("commit 03"),
|
||||
Contains("commit 02"),
|
||||
Contains("commit 01").IsSelected(), // wrong, we want the previous line
|
||||
).
|
||||
SelectPreviousItem()
|
||||
Contains("commit 02").IsSelected(),
|
||||
Contains("commit 01"),
|
||||
)
|
||||
|
||||
t.Views().Main().
|
||||
Content(Contains("fixup content"))
|
||||
|
@ -45,11 +45,10 @@ var SquashFixupsInCurrentBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
}).
|
||||
Lines(
|
||||
Contains("commit 02"),
|
||||
Contains("commit 01"),
|
||||
Contains("fixup! master commit").IsSelected(), // wrong, we want the previous line
|
||||
Contains("commit 01").IsSelected(),
|
||||
Contains("fixup! master commit"),
|
||||
Contains("master commit"),
|
||||
).
|
||||
NavigateToLine(Contains("commit 01"))
|
||||
)
|
||||
|
||||
t.Views().Main().
|
||||
Content(Contains("fixup content"))
|
||||
|
Reference in New Issue
Block a user