mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Fix: set state to nil when patch building view loses focus
This is also what we do in the staging controller, and it makes it so that when you exit the patch building view and then enter it again (for another file, or the same one) we select the first hunk again.
This commit is contained in:
parent
da47498066
commit
2b49865d0d
|
|
@ -73,6 +73,8 @@ func (self *PatchBuildingController) GetOnFocus() func(types.OnFocusOpts) {
|
|||
|
||||
func (self *PatchBuildingController) GetOnFocusLost() func(types.OnFocusLostOpts) {
|
||||
return func(opts types.OnFocusLostOpts) {
|
||||
self.context().SetState(nil)
|
||||
|
||||
self.c.Views().PatchBuilding.Wrap = true
|
||||
|
||||
if self.c.Git().Patch.PatchBuilder.IsEmpty() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue