Display scroll indicator in preview window

This commit is contained in:
Junegunn Choi 2016-10-04 01:40:45 +09:00
parent 51f532697e
commit 154cf22ffa
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -822,6 +822,11 @@ func (t *Terminal) printPreview() {
}
return t.pwindow.Fill(str)
})
if t.previewer.offset > 0 {
offset := fmt.Sprintf("%d/%d", t.previewer.offset+1, t.previewer.lines)
t.pwindow.Move(0, t.pwindow.Width-len(offset))
t.pwindow.CPrint(C.ColInfo, C.Reverse, offset)
}
}
func processTabs(runes []rune, prefixWidth int) (string, int) {