whitespace: use airline#util#warning instead of echo consistently

This commit is contained in:
Christian Brabandt 2018-11-13 21:28:47 +01:00
parent 2eaf57ece8
commit c3ee263d5b
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -67,7 +67,7 @@ function! airline#extensions#whitespace#check()
let regexp = get(g:, 'airline#extensions#whitespace#trailing_regexp', '\s$') let regexp = get(g:, 'airline#extensions#whitespace#trailing_regexp', '\s$')
let trailing = search(regexp, 'nw') let trailing = search(regexp, 'nw')
catch catch
echomsg 'airline#whitespace: error occurred evaluating '. regexp call airline#util#warning(printf('Whitespace: error occurred evaluating "%s"', regexp))
echomsg v:exception echomsg v:exception
return '' return ''
endtry endtry
@ -140,7 +140,7 @@ function! airline#extensions#whitespace#toggle()
call airline#update_statusline() call airline#update_statusline()
endif endif
endif endif
echo 'Whitespace checking: '.(s:enabled ? 'Enabled' : 'Disabled') call airline#util#warning(printf('Whitespace checking: %s',(s:enabled ? 'Enabled' : 'Disabled')))
endfunction endfunction
function! airline#extensions#whitespace#disable() function! airline#extensions#whitespace#disable()