1
0
mirror of https://github.com/mum4k/termdash.git synced 2025-04-27 13:48:49 +08:00

added the ability to change the scrolling runes

This commit is contained in:
dank 2020-10-13 00:42:25 -04:00 committed by GitHub
parent 8a316e6c1b
commit c3220f04f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,7 +125,7 @@ const minLinesForMarkers = 3
func (t *Text) drawScrollUp(cvs *canvas.Canvas, cur image.Point, fromLine int) (bool, error) {
height := cvs.Area().Dy()
if cur.Y == 0 && height >= minLinesForMarkers && fromLine > 0 {
cells, err := cvs.SetCell(cur, '⇧')
cells, err := cvs.SetCell(cur, t.opts.scrollUp)
if err != nil {
return false, err
}
@ -144,7 +144,7 @@ func (t *Text) drawScrollDown(cvs *canvas.Canvas, cur image.Point, fromLine int)
height := cvs.Area().Dy()
lines := len(t.wrapped)
if cur.Y == height-1 && height >= minLinesForMarkers && height < lines-fromLine {
cells, err := cvs.SetCell(cur, '⇩')
cells, err := cvs.SetCell(cur, t.opts.scrollDown)
if err != nil {
return false, err
}