summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-03-04 23:55:12 +0000
committerw0rp <devw0rp@gmail.com>2017-03-04 23:55:12 +0000
commit76df2d393b6b79f1f0d3095589e7f3ac90de2b40 (patch)
tree6715b53854ef7fa1b92a10c4afd38a53fa3e5b17 /autoload
parentc1947d13cf7ec2e15058f5eea232d9b0c2377d44 (diff)
downloadale-76df2d393b6b79f1f0d3095589e7f3ac90de2b40.zip
Fix detailed messages with newline characters
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/cursor.vim9
1 files changed, 6 insertions, 3 deletions
diff --git a/autoload/ale/cursor.vim b/autoload/ale/cursor.vim
index cd9593ce..ad580b98 100644
--- a/autoload/ale/cursor.vim
+++ b/autoload/ale/cursor.vim
@@ -23,16 +23,19 @@ function! s:EchoWithShortMess(setting, message) abort
let l:shortmess_options = getbufvar('%', '&shortmess')
try
- " Turn shormess on or off.
+ " Turn shortmess on or off.
if a:setting ==# 'on'
setlocal shortmess+=T
+ " echomsg is neede for the message to get truncated and appear in
+ " the message history.
+ exec "norm! :echomsg a:message\n"
elseif a:setting ==# 'off'
setlocal shortmess-=T
+ " Regular echo is needed for printing newline characters.
+ echo a:message
else
throw 'Invalid setting: ' . string(a:setting)
endif
-
- exec "norm! :echomsg a:message\n"
finally
call setbufvar('%', '&shortmess', l:shortmess_options)
endtry