1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-09 13:47:11 +02:00

correct cursor before returning item position

This commit is contained in:
Jesse Duffield 2018-08-13 21:42:56 +10:00
parent 3bd0246e4d
commit fb0004481b

View File

@ -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