Skip to content

Commit df0f1db

Browse files
authored
Make startify#center() use window width (#464)
1 parent 3ffa62f commit df0f1db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/startify.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ endfunction
442442
function! startify#center(lines) abort
443443
let longest_line = max(map(copy(a:lines), 'strwidth(v:val)'))
444444
return map(copy(a:lines),
445-
\ 'repeat(" ", (&columns / 2) - (longest_line / 2) - 1) . v:val')
445+
\ 'repeat(" ", (winwidth(0) / 2) - (longest_line / 2) - 1) . v:val')
446446
endfunction
447447

448448
" Function: s:get_lists {{{1

0 commit comments

Comments
 (0)