Skip to content

Commit

Permalink
Fixing bad comparison causing ToggleLogs to fail
Browse files Browse the repository at this point in the history
`is` in Python checks for identity, not equality.
  • Loading branch information
Valloric committed Feb 29, 2016
1 parent ba97a28 commit 1c65c96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/ycm/vimsupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def EchoTextVimWidth( text ):


def EscapeForVim( text ):
return text.replace( "'", "''" )
return ToUnicode( text.replace( "'", "''" ) )


def CurrentFiletypes():
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 1c65c96

Please sign in to comment.