From 6ced8b8ce6efb7b97e38273198182d1b4d9d9a6f Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Tue, 6 Aug 2013 22:02:53 -0400 Subject: [PATCH] add line number for trailing spaces --- autoload/airline/extensions/whitespace.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/airline/extensions/whitespace.vim b/autoload/airline/extensions/whitespace.vim index ad964e76..f91998a7 100644 --- a/autoload/airline/extensions/whitespace.vim +++ b/autoload/airline/extensions/whitespace.vim @@ -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 '