Skip to content

Commit

Permalink
Make startify#center() use window width (mhinz#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndavd authored Apr 23, 2021
1 parent 3ffa62f commit df0f1db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/startify.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df0f1db

Please sign in to comment.