diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-29 13:33:54 +1100 |
---|---|---|
committer | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2020-03-29 02:36:01 +0000 |
commit | 9eb1cbc51434697e4a7edac8bd14839847719af3 (patch) | |
tree | 81790adf23ffe4a059138c796f3881fb29458508 /pkg/gui/view_helpers.go | |
parent | 40b173118ac1ba3b42c01696521baf87af6f75e4 (diff) |
reset main's origin when cycling views
Diffstat (limited to 'pkg/gui/view_helpers.go')
-rw-r--r-- | pkg/gui/view_helpers.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index 826563efb..c647d1819 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -169,6 +169,9 @@ func (gui *Gui) nextView(g *gocui.Gui, v *gocui.View) error { if err != nil { panic(err) } + if err := gui.resetOrigin(gui.getMainView()); err != nil { + return err + } return gui.switchFocus(g, v, focusedView) } @@ -203,6 +206,9 @@ func (gui *Gui) previousView(g *gocui.Gui, v *gocui.View) error { if err != nil { panic(err) } + if err := gui.resetOrigin(gui.getMainView()); err != nil { + return err + } return gui.switchFocus(g, v, focusedView) } |