mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-12-24 00:21:22 +02:00
Fix the main view display after reverting a commit
We move the selection down by the number of commits that were reverted (to keep the same commits selected). However, this only happens after refreshing, which has rendered the main view with the wrong commit, so we need to render it again after moving the selection. There are many other callers of MoveSelection in LocalCommitsController, but all of them happen before the refresh. Revert is special because it needs to move the selection after refreshing, e.g. when reverting the only commit of a branch.
This commit is contained in:
@@ -33,10 +33,7 @@ var Revert = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Contains("first commit").IsSelected(),
|
||||
).
|
||||
Tap(func() {
|
||||
/* EXPECTED:
|
||||
t.Views().Main().Content(Contains("+myfile content"))
|
||||
ACTUAL: */
|
||||
t.Views().Main().Content(Contains("-myfile content"))
|
||||
}).
|
||||
SelectPreviousItem()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user