Fix relocation with softwrap on small buffers

Fixes #1512
This commit is contained in:
Zachary Yedidia 2020-02-15 15:38:20 -05:00
parent 087e7207f7
commit cc994b6241
2 changed files with 1 additions and 3 deletions

View file

@ -396,6 +396,7 @@ func (h *BufPane) CursorStart() bool {
h.Cursor.Deselect(true)
h.Cursor.X = 0
h.Cursor.Y = 0
h.Cursor.StoreVisualX()
h.Relocate()
return true
}

View file

@ -136,9 +136,6 @@ func (w *BufWindow) Relocate() bool {
if w.drawStatus {
h--
}
if b.LinesNum() <= h {
height = w.Height
}
ret := false
activeC := w.Buf.GetActiveCursor()
cy := activeC.Y