浏览代码

Fix traceback on quote in filename

Fixes #1109
Strahinja Val Markovic 10 年之前
父节点
当前提交
f1ebf51fcb
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 ) ) )