mirror of
https://github.com/vim-airline/vim-airline-themes.git
synced 2024-12-05 08:30:03 +08:00
add line number for trailing spaces
This commit is contained in:
parent
0a015e5305
commit
6ced8b8ce6
|
@ -6,14 +6,14 @@
|
|||
function! airline#extensions#whitespace#check()
|
||||
if !exists('b:airline_whitespace_check')
|
||||
let b:airline_whitespace_check = ''
|
||||
let trailing = search(' $', 'nw') != 0
|
||||
let trailing = search(' $', 'nw')
|
||||
let mixed = search('^ ', 'nw') != 0 && search('^\t', 'nw') != 0
|
||||
|
||||
if trailing || mixed
|
||||
if trailing != 0 || mixed
|
||||
let b:airline_whitespace_check = g:airline_whitespace_symbol." "
|
||||
if g:airline_detect_whitespace == 1
|
||||
if trailing
|
||||
let b:airline_whitespace_check .= 'trailing '
|
||||
if trailing != 0
|
||||
let b:airline_whitespace_check .= 'trailing['.trailing.']'
|
||||
endif
|
||||
if mixed
|
||||
let b:airline_whitespace_check .= 'mixed-indent '
|
||||
|
|
Loading…
Reference in New Issue
Block a user