Allow the cursor messages to be disabled while Vim is running

This commit is contained in:
w0rp
2017-12-19 14:43:18 +00:00
parent a7d51afda5
commit d2bea5c310
2 changed files with 19 additions and 0 deletions

View File

@@ -55,6 +55,10 @@ function! ale#cursor#EchoCursorWarning(...) abort
endfunction
function! s:EchoImpl() abort
if !g:ale_echo_cursor
return
endif
" Only echo the warnings in normal mode, otherwise we will get problems.
if mode() isnot# 'n'
return
@@ -81,6 +85,10 @@ function! s:EchoImpl() abort
endfunction
function! ale#cursor#EchoCursorWarningWithDelay() abort
if !g:ale_echo_cursor
return
endif
" Only echo the warnings in normal mode, otherwise we will get problems.
if mode() isnot# 'n'
return