Make startify#center() use window width (#464)
This commit is contained in:
parent
3ffa62fbe7
commit
df0f1dbdc0
|
@ -442,7 +442,7 @@ endfunction
|
||||||
function! startify#center(lines) abort
|
function! startify#center(lines) abort
|
||||||
let longest_line = max(map(copy(a:lines), 'strwidth(v:val)'))
|
let longest_line = max(map(copy(a:lines), 'strwidth(v:val)'))
|
||||||
return map(copy(a:lines),
|
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
|
endfunction
|
||||||
|
|
||||||
" Function: s:get_lists {{{1
|
" Function: s:get_lists {{{1
|
||||||
|
|
Loading…
Reference in a new issue