mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-09 14:20:16 +09:00
Proper scrollbar location for hsplits
This commit is contained in:
@@ -651,7 +651,7 @@ func (w *BufWindow) displayScrollBar() {
|
||||
if barsize < 1 {
|
||||
barsize = 1
|
||||
}
|
||||
barstart := int(float64(w.StartLine) / float64(w.Buf.LinesNum()) * float64(w.Height))
|
||||
barstart := w.Y + int(float64(w.StartLine)/float64(w.Buf.LinesNum())*float64(w.Height))
|
||||
for y := barstart; y < util.Min(barstart+barsize, w.Y+bufHeight); y++ {
|
||||
screen.Screen.SetContent(scrollX, y, '|', nil, config.DefStyle.Reverse(true))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user