1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

use lineheight rather than buffer length

This commit is contained in:
Jesse Duffield
2018-09-22 13:44:48 +10:00
parent 3101c50582
commit 619c28ce56
4 changed files with 7 additions and 7 deletions

View File

@ -183,7 +183,7 @@ func (gui *Gui) cursorDown(g *gocui.Gui, v *gocui.View) error {
}
cx, cy := v.Cursor()
ox, oy := v.Origin()
ly := len(v.BufferLines()) - 1
ly := v.LinesHeight() - 1
_, height := v.Size()
maxY := height - 1
@ -219,7 +219,7 @@ func (gui *Gui) correctCursor(v *gocui.View) error {
ox, oy := v.Origin()
_, height := v.Size()
maxY := height - 1
ly := len(v.BufferLines()) - 1
ly := v.LinesHeight() - 1
if oy+cy <= ly {
return nil
}