mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 12:42:57 +08:00
neovim: support global statusline and do not truncate too early
With Neovims recent merge of a global statusline (e.g. a statusline that is the same across all windows), make sure that truncation only happens, by checking the complete terminal window width instead of using the Vim window width (similar to when using g:airline_statusline_ontop). related: #2517
This commit is contained in:
parent
e2498d72dc
commit
1d486430cc
|
@ -18,7 +18,9 @@ let s:focusgained_ignore_time = 0
|
|||
" actually changed.
|
||||
function! airline#util#winwidth(...) abort
|
||||
let nr = get(a:000, 0, 0)
|
||||
if get(g:, 'airline_statusline_ontop', 0)
|
||||
" When statusline is on top, or using global statusline for Neovim
|
||||
" always return the number of columns
|
||||
if get(g:, 'airline_statusline_ontop', 0) || &laststatus > 2
|
||||
return &columns
|
||||
else
|
||||
return winwidth(nr)
|
||||
|
|
Loading…
Reference in New Issue
Block a user