Add the b:airline_whitespace_disabled feature.

If the per-buffer variable b:airline_whitespace_disabled is defined
and non-zero, whitespace checking will be disabled for that buffer.
This commit is contained in:
Michael Henry
2016-05-14 15:56:48 -04:00
parent ba94fa12b9
commit e67b2847ea
2 changed files with 10 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ endfunction
function! airline#extensions#whitespace#check()
if &readonly || !&modifiable || !s:enabled || line('$') > s:max_lines
\ || get(b:, 'airline_whitespace_disabled', 0)
return ''
endif