Fixing bad comparison causing ToggleLogs to fail

`is` in Python checks for identity, not equality.
This commit is contained in:
Val Markovic 2016-02-28 19:16:06 -08:00
parent ba97a28b62
commit 1c65c96e65

View File

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