From df0f1dbdc0689f6172bdd3b8685868aa93446c6f Mon Sep 17 00:00:00 2001 From: ndavid <74260683+ndavidq0@users.noreply.github.com> Date: Fri, 23 Apr 2021 19:19:48 +0100 Subject: [PATCH] Make startify#center() use window width (#464) --- autoload/startify.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index 4c13b49..6070b12 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -442,7 +442,7 @@ endfunction function! startify#center(lines) abort let longest_line = max(map(copy(a:lines), 'strwidth(v:val)')) return map(copy(a:lines), - \ 'repeat(" ", (&columns / 2) - (longest_line / 2) - 1) . v:val') + \ 'repeat(" ", (winwidth(0) / 2) - (longest_line / 2) - 1) . v:val') endfunction " Function: s:get_lists {{{1