mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 15:59:23 +08:00
specify maximum for whitespace checking. resolves #378.
This commit is contained in:
parent
739a275d5d
commit
df2f33d6a5
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
<
|
||||
|
|
Loading…
Reference in New Issue
Block a user