From 1c65c96e658be6f60ed1e5d0438330196202bbf0 Mon Sep 17 00:00:00 2001 From: Val Markovic Date: Sun, 28 Feb 2016 19:16:06 -0800 Subject: [PATCH] Fixing bad comparison causing ToggleLogs to fail `is` in Python checks for identity, not equality. --- python/ycm/vimsupport.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ycm/vimsupport.py b/python/ycm/vimsupport.py index 4921ed23..a3d8425a 100644 --- a/python/ycm/vimsupport.py +++ b/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: