mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-11 16:16:28 -04:00
Fix the main view display after reverting a commit (#5138)
After reverting a commit, the main view would show the diff of a commit that is not the selected one.
This commit is contained in:
commit
74b1255b4b
|
|
@ -869,7 +869,7 @@ func (self *LocalCommitsController) revert(commits []*models.Commit, start, end
|
|||
return err
|
||||
}
|
||||
self.context().MoveSelection(len(commits))
|
||||
self.context().FocusLine()
|
||||
self.context().HandleFocus(types.OnFocusOpts{})
|
||||
|
||||
if mustStash {
|
||||
if err := self.c.Git().Stash.Pop(0); err != nil {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ var Revert = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
Contains("Revert \"first commit\""),
|
||||
Contains("first commit").IsSelected(),
|
||||
).
|
||||
Tap(func() {
|
||||
t.Views().Main().Content(Contains("+myfile content"))
|
||||
}).
|
||||
SelectPreviousItem()
|
||||
|
||||
t.Views().Main().Content(Contains("-myfile content"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue