fix a minor issue when echoing the current error

Only clear the cmd window when it is displaying a message that we
echoed. Previously we were echoing a blank line every time the cursor
moved - this was clearing messages generated from other sources than
syntastic.
This commit is contained in:
Martin Grenfell 2011-12-11 09:32:36 +00:00
parent e24bd80f44
commit cafb55b3c8

View File

@ -340,12 +340,16 @@ function! s:EchoCurrentError()
let lnum = line(".")
for i in b:syntastic_loclist
if lnum == i['lnum']
let b:syntastic_echoing_error = 1
return s:WideMsg(i['text'])
endif
endfor
"Otherwise, clear the status line
if exists("b:syntastic_echoing_error")
echo
unlet b:syntastic_echoing_error
endif
endfunction
"return a string representing the state of buffer according to