:YcmDiags exits when compilation fails
Previously we'd tell the user "No warnings or errors detected", which is wrong.
This commit is contained in:
parent
56b2f70a1a
commit
0535d0ec9a
@ -581,7 +581,11 @@ command! YcmForceCompileAndDiagnostics call s:ForceCompileAndDiagnostics()
|
|||||||
|
|
||||||
|
|
||||||
function! s:ShowDiagnostics()
|
function! s:ShowDiagnostics()
|
||||||
call s:ForceCompile()
|
let compilation_succeeded = s:ForceCompile()
|
||||||
|
if !compilation_succeeded
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
let diags = pyeval( 'ycm_state.GetDiagnosticsForCurrentFile()' )
|
let diags = pyeval( 'ycm_state.GetDiagnosticsForCurrentFile()' )
|
||||||
if !empty( diags )
|
if !empty( diags )
|
||||||
call setloclist( 0, diags )
|
call setloclist( 0, diags )
|
||||||
|
Loading…
Reference in New Issue
Block a user