Explorar o código

Fix traceback on quote in filename

Fixes #1109
Strahinja Val Markovic %!s(int64=10) %!d(string=hai) anos
pai
achega
f1ebf51fcb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      python/ycm/vimsupport.py

+ 1 - 1
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 ) ) )