specify maximum for whitespace checking. resolves #378.

This commit is contained in:
Bailey Ling 2013-12-13 16:38:32 -05:00
parent 739a275d5d
commit df2f33d6a5
2 changed files with 6 additions and 1 deletions

View File

@ -16,10 +16,12 @@ let s:default_checks = ['indent', 'trailing']
let s:trailing_format = get(g:, 'airline#extensions#whitespace#trailing_format', 'trailing[%s]')
let s:mixed_indent_format = get(g:, 'airline#extensions#whitespace#mixed_indent_format', 'mixed-indent[%s]')
let s:max_lines = get(g:, 'airline#extensions#whitespace#max_lines', 20000)
let s:enabled = 1
function! airline#extensions#whitespace#check()
if &readonly || !&modifiable || !s:enabled
if &readonly || !&modifiable || !s:enabled || line('$') > s:max_lines
return ''
endif

View File

@ -355,6 +355,9 @@ eclim <https://eclim.org>
* configure which whitespace checks to enable. >
let g:airline#extensions#whitespace#checks = [ 'indent', 'trailing' ]
<
* configure the maximum number of lines where whitespace checking is enabled. >
let g:airline#extensions#whitespace#max_lines = 20000
<
* configure whether a message should be displayed. >
let g:airline#extensions#whitespace#show_message = 1
<