mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-03-06 23:24:18 +08:00
refactor shortening code
This commit is contained in:
@@ -106,12 +106,7 @@ function! airline#extensions#whitespace#check()
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if winwidth(0) < 120 && len(split(b:airline_whitespace_check, '\zs')) > 9
|
||||
return matchstr(b:airline_whitespace_check, '^.\{9\}').'…'
|
||||
else
|
||||
return b:airline_whitespace_check
|
||||
endif
|
||||
|
||||
return airline#util#shorten(b:airline_whitespace_check, 120, 9)
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#whitespace#toggle()
|
||||
|
||||
Reference in New Issue
Block a user