Browse Source

Do not poll for messages in blacklisted filetypes

Boris Staletic 5 years ago
parent
commit
b9db197d97
1 changed files with 5 additions and 1 deletions
  1. 5 1
      autoload/youcompleteme.vim

+ 5 - 1
autoload/youcompleteme.vim

@@ -94,7 +94,11 @@ endfunction
 
 
 function! s:ReceiveMessages( timer_id )
-  let poll_again = s:Pyeval( 'ycm_state.OnPeriodicTick()' )
+  let poll_again = v:false
+  if s:AllowedToCompleteInCurrentBuffer()
+    let poll_again = s:Pyeval( 'ycm_state.OnPeriodicTick()' )
+  endif
+
 
   if poll_again
     let s:pollers.receive_messages.id = timer_start(