From affe12b7e7bed68792d6c16a2a9457acc6348ece Mon Sep 17 00:00:00 2001 From: Youngjae Lee Date: Wed, 26 May 2021 10:48:36 +0900 Subject: [PATCH] scrollbar: fix first line overwrite --- autoload/airline/extensions/scrollbar.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline/extensions/scrollbar.vim b/autoload/airline/extensions/scrollbar.vim index 38be207e..ff84ff79 100644 --- a/autoload/airline/extensions/scrollbar.vim +++ b/autoload/airline/extensions/scrollbar.vim @@ -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