summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2016-10-09 12:50:45 +0100
committerw0rp <devw0rp@gmail.com>2016-10-09 12:50:51 +0100
commit34241edcdbc562f074988ba54b970a6ecf8dd4d9 (patch)
tree9e5e2d94da849beaf4a6cae936b24ecf16601487 /plugin
parent8433dbcea987480db8c9817f23ccfb708f8d3041 (diff)
downloadale-34241edcdbc562f074988ba54b970a6ecf8dd4d9.zip
Fix a bug where echoing in modes like visual select caused some errors.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/ale/cursor.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugin/ale/cursor.vim b/plugin/ale/cursor.vim
index 1fc0d70d..e0751a8c 100644
--- a/plugin/ale/cursor.vim
+++ b/plugin/ale/cursor.vim
@@ -63,6 +63,11 @@ function! ale#cursor#TruncatedEcho(message)
endfunction
function! ale#cursor#EchoCursorWarning(...)
+ " Only echo the warnings in normal mode, otherwise we will get problems.
+ if mode() !=# 'n'
+ return
+ endif
+
let buffer = bufnr('%')
if !has_key(g:ale_buffer_loclist_map, buffer)