From cafb55b3c859d787d7d09b0ea072d848071d9959 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sun, 11 Dec 2011 09:32:36 +0000 Subject: [PATCH] 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. --- plugin/syntastic.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index ff6bd8a4..1ceba518 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -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 - echo + if exists("b:syntastic_echoing_error") + echo + unlet b:syntastic_echoing_error + endif endfunction "return a string representing the state of buffer according to