Merge pull request #947 from chrisbra/custom_trailing_space

Allow to customize the trailing whitespace regexp
This commit is contained in:
Christian Brabandt
2016-01-27 20:40:47 +01:00
2 changed files with 11 additions and 1 deletions

View File

@@ -49,7 +49,14 @@ function! airline#extensions#whitespace#check()
let trailing = 0
if index(checks, 'trailing') > -1
let trailing = search('\s$', 'nw')
try
let regexp = get(g:, 'airline#extensions#whitespace#trailing_regexp', '\s$')
let trailing = search(regexp, 'nw')
catch
echomsg 'airline#whitespace: error occured evaluating '. regexp
echomsg v:exception
return ''
endtry
endif
let mixed = 0