Skip to content

Commit 9e02cfa

Browse files
committed
Do not echo diagnostics in virtual-text when update_diagnostics_in_insert_mode == 0
Needed settings: let g:ycm_update_diagnostics_in_insert_mode = 0 let g:ycm_echo_current_diagnostic = 'virtual-text' Previously, whenever we should NOT display diagnostic UI, but diag message would not need clearing, we ended up echoing. Most noticable in the following example int main() { puts("")<CR> } Note that this first patch still leaves a diagnostic UI flicker on InsertLeave.
1 parent 88ed5a7 commit 9e02cfa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

python/ycm/diagnostic_interface.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ def OnCursorMoved( self ):
4444
if self._user_options[ 'echo_current_diagnostic' ]:
4545
line, _ = vimsupport.CurrentLineAndColumn()
4646
line += 1 # Convert to 1-based
47-
if ( not self.ShouldUpdateDiagnosticsUINow() and
48-
self._diag_message_needs_clearing ):
47+
if not self.ShouldUpdateDiagnosticsUINow():
4948
# Clear any previously echo'd diagnostic in insert mode
5049
self._EchoDiagnosticText( line, None, None )
5150
elif line != self._previous_diag_line_number:

0 commit comments

Comments
 (0)