Explorar o código

Make startify#center() use window width (#464)

ndavid %!s(int64=4) %!d(string=hai) anos
pai
achega
df0f1dbdc0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      autoload/startify.vim

+ 1 - 1
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