Merge pull request #1200 from chrisbra/width

limit whitespace check output for smaller screens
This commit is contained in:
Christian Brabandt 2016-07-01 11:17:16 +02:00 committed by GitHub
commit fbfea6daee
1 changed files with 6 additions and 1 deletions

View File

@ -106,7 +106,12 @@ 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
endfunction
function! airline#extensions#whitespace#toggle()