diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-10-17 19:01:02 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-10-17 19:45:57 +1100 |
commit | d672b7342f12c64112cd6b59fb5e4286a7cb92b4 (patch) | |
tree | 4b4c51680b05217708ce7ca596b6a47ffc170838 /pkg/gui/list_context.go | |
parent | e7c27b6f4aef44a2391dd207e1321008b5d1dcff (diff) |
stop resetting scroll all the time
Diffstat (limited to 'pkg/gui/list_context.go')
-rw-r--r-- | pkg/gui/list_context.go | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/pkg/gui/list_context.go b/pkg/gui/list_context.go index dc9425d20..a8ed12372 100644 --- a/pkg/gui/list_context.go +++ b/pkg/gui/list_context.go @@ -11,8 +11,7 @@ type ListContext struct { SelectedItem func() (ListItem, bool) GetPanelState func() IListPanelState - Gui *Gui - ResetMainViewOriginOnFocus bool + Gui *Gui *BasicContext } @@ -79,15 +78,6 @@ func (lc *ListContext) HandleFocus() error { view.FocusPoint(0, lc.GetPanelState().GetSelectedLineIdx()) - if lc.ResetMainViewOriginOnFocus { - if err := lc.Gui.resetOrigin(lc.Gui.Views.Main); err != nil { - return err - } - if err := lc.Gui.resetOrigin(lc.Gui.Views.Secondary); err != nil { - return err - } - } - if lc.Gui.State.Modes.Diffing.Active() { return lc.Gui.renderDiff() } |