scrollbar: fix first line overwrite

This commit is contained in:
Youngjae Lee 2021-05-26 10:48:36 +09:00
parent 4a64fbfc4b
commit affe12b7e7

View File

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