Always print scroll indicator in preview window

This commit is contained in:
Junegunn Choi 2016-11-26 12:34:00 +09:00
parent dffef3d9f3
commit 3858086047
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -833,7 +833,7 @@ func (t *Terminal) printPreview() {
} }
return t.pwindow.Fill(str) return t.pwindow.Fill(str)
}) })
if t.previewer.offset > 0 { if t.previewer.lines > t.pwindow.Height {
offset := fmt.Sprintf("%d/%d", t.previewer.offset+1, t.previewer.lines) offset := fmt.Sprintf("%d/%d", t.previewer.offset+1, t.previewer.lines)
t.pwindow.Move(0, t.pwindow.Width-len(offset)) t.pwindow.Move(0, t.pwindow.Width-len(offset))
t.pwindow.CPrint(tui.ColInfo, tui.Reverse, offset) t.pwindow.CPrint(tui.ColInfo, tui.Reverse, offset)