Fix regression in preview window rendering

This commit is contained in:
Junegunn Choi 2021-03-12 21:23:16 +09:00
parent 4c4c6e626e
commit b24a2e2fdc
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -920,7 +920,12 @@ func (w *LightWindow) fill(str string, onMove func()) FillReturn {
} }
} }
} }
if w.posx >= w.Width()-1 { if w.posx+1 >= w.Width() {
if w.posy+1 >= w.height {
return FillSuspend
}
w.Move(w.posy+1, 0)
onMove()
return FillNextLine return FillNextLine
} }
return FillContinue return FillContinue