Add scrollbar color group (#1840)

Ref #1837
This commit is contained in:
Dmitry Maluka
2020-08-23 21:45:43 +02:00
committed by GitHub
parent 3ba03cca15
commit c7e72220dd

View File

@@ -736,8 +736,14 @@ func (w *BufWindow) displayScrollBar() {
barsize = 1
}
barstart := w.Y + int(float64(w.StartLine)/float64(w.Buf.LinesNum())*float64(w.Height))
scrollBarStyle := config.DefStyle.Reverse(true)
if style, ok := config.Colorscheme["scrollbar"]; ok {
scrollBarStyle = style
}
for y := barstart; y < util.Min(barstart+barsize, w.Y+bufHeight); y++ {
screen.SetContent(scrollX, y, '|', nil, config.DefStyle.Reverse(true))
screen.SetContent(scrollX, y, '|', nil, scrollBarStyle)
}
}
}