fix a strange bug when echoing error messages
In the javascript:jshint checker the error messages are being returned with a newline prefixed to the front. I have tried to fix this in the errorformat - but I cant see anything that would cause it. Im not sure if this is a one-off thing, but strip out all new lines here just in case.
This commit is contained in:
parent
8491df95d6
commit
e24bd80f44
@ -313,9 +313,18 @@ function! s:WideMsg(msg)
|
||||
let old_ruler = &ruler
|
||||
let old_showcmd = &showcmd
|
||||
|
||||
let msg = strpart(a:msg, 0, winwidth(0)-1)
|
||||
|
||||
"This is here because it is possible for some error messages to begin with
|
||||
"\n which will cause a "press enter" prompt. I have noticed this in the
|
||||
"javascript:jshint checker and have been unable to figure out why it
|
||||
"happens
|
||||
let msg = substitute(msg, "\n", "", "g")
|
||||
|
||||
set noruler noshowcmd
|
||||
redraw
|
||||
echo strpart(a:msg, 0, winwidth(0)-1)
|
||||
|
||||
echo msg
|
||||
|
||||
let &ruler=old_ruler
|
||||
let &showcmd=old_showcmd
|
||||
|
Loading…
x
Reference in New Issue
Block a user