diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-13 21:42:56 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-13 21:42:56 +1000 |
commit | fb0004481b445b30b8180ddb27fb61e3c541337a (patch) | |
tree | c43738395f928b3df507ee9895d00eec53a4dbe7 | |
parent | 3bd0246e4d752fe8b00c4a6dc41463dfd0ee0dd3 (diff) |
correct cursor before returning item position
-rw-r--r-- | pkg/gui/view_helpers.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index a3e2877c3..331e27975 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -118,6 +118,7 @@ func (gui *Gui) switchFocus(g *gocui.Gui, oldView, newView *gocui.View) error { } func (gui *Gui) getItemPosition(v *gocui.View) int { + gui.correctCursor(v) _, cy := v.Cursor() _, oy := v.Origin() return oy + cy |