Merge pull request #2390 from ls4154/master

scrollbar: fix first line overwrite
This commit is contained in:
Christian Brabandt
2021-05-26 08:01:43 +02:00
committed by GitHub

View File

@@ -16,7 +16,7 @@ function! airline#extensions#scrollbar#calculate() abort
let width = 20 " max width, plus one border and indicator
let perc = (line('.') + 0.0) / (line('$') + 0.0)
let before = float2nr(round(perc * width))
if before > 0 && line('.') == 1
if before >= 0 && line('.') == 1
let before = 0
let left = (overwrite ? '' : left)
endif