Disallow preview scroll when the content just fits the window

This commit is contained in:
Junegunn Choi 2019-05-21 16:35:45 +09:00
parent 430e8193e0
commit 0e3e6ac442
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -1055,7 +1055,7 @@ func (t *Terminal) printPreview() {
}
return fillRet == tui.FillContinue
})
t.previewer.more = t.previewer.more || t.pwindow.Y() == height-1 && t.pwindow.X() > 0
t.previewer.more = t.previewer.more || t.pwindow.Y() == height-1 && t.pwindow.X() == t.pwindow.Width()
if fillRet == tui.FillNextLine {
continue
} else if fillRet == tui.FillSuspend {