Prechádzať zdrojové kódy

Fixing bad comparison causing ToggleLogs to fail

`is` in Python checks for identity, not equality.
Val Markovic 9 rokov pred
rodič
commit
1c65c96e65
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      python/ycm/vimsupport.py

+ 2 - 2
python/ycm/vimsupport.py

@@ -489,7 +489,7 @@ def EchoTextVimWidth( text ):
 
 
 def EscapeForVim( text ):
-  return text.replace( "'", "''" )
+  return ToUnicode( text.replace( "'", "''" ) )
 
 
 def CurrentFiletypes():
@@ -861,7 +861,7 @@ def BufferIsVisibleForFilename( filename ):
 def CloseBuffersForFilename( filename ):
   """Close all buffers for a specific file."""
   buffer_number = GetBufferNumberForFilename( filename, False )
-  while buffer_number is not -1:
+  while buffer_number != -1:
     vim.command( 'silent! bwipeout! {0}'.format( buffer_number ) )
     new_buffer_number = GetBufferNumberForFilename( filename, False )
     if buffer_number == new_buffer_number: