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
commit 73025ea504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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