diff --git a/python/ycm/vimsupport.py b/python/ycm/vimsupport.py index 8fd4a01a..a97924e6 100644 --- a/python/ycm/vimsupport.py +++ b/python/ycm/vimsupport.py @@ -104,7 +104,7 @@ def GetUnsavedAndCurrentBufferData(): def GetBufferNumberForFilename( filename, open_file_if_needed = True ): return GetIntValue( u"bufnr('{0}', {1})".format( - os.path.realpath( filename ), + EscapeForVim( os.path.realpath( filename ) ), int( open_file_if_needed ) ) )