make EchoCurrentError() not mask errors with warnings
This commit is contained in:
parent
17f9b764de
commit
bfe3725e13
@ -377,13 +377,16 @@ function! s:EchoCurrentError()
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
"If we have an error or warning at the current line, show it
|
"If we have an error or warning at the current line, show it
|
||||||
let lnum = line(".")
|
let errors = s:FilterLocList(b:syntastic_loclist, {'lnum': line("."), "type": 'e'})
|
||||||
for i in b:syntastic_loclist
|
let warnings = s:FilterLocList(b:syntastic_loclist, {'lnum': line("."), "type": 'w'})
|
||||||
if lnum == i['lnum']
|
|
||||||
let b:syntastic_echoing_error = 1
|
let b:syntastic_echoing_error = len(errors) || len(warnings)
|
||||||
return s:WideMsg(i['text'])
|
if len(errors)
|
||||||
|
return s:WideMsg(errors[0]['text'])
|
||||||
|
endif
|
||||||
|
if len(warnings)
|
||||||
|
return s:WideMsg(warnings[0]['text'])
|
||||||
endif
|
endif
|
||||||
endfor
|
|
||||||
|
|
||||||
"Otherwise, clear the status line
|
"Otherwise, clear the status line
|
||||||
if exists("b:syntastic_echoing_error")
|
if exists("b:syntastic_echoing_error")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user