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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user