Browse Source

Enforcing unicode in more vimsupport functions

Val Markovic 9 years ago
parent
commit
80631b1aaf
1 changed files with 2 additions and 2 deletions
  1. 2 2
      python/ycm/vimsupport.py

+ 2 - 2
python/ycm/vimsupport.py

@@ -319,8 +319,8 @@ def GetReadOnlyVimGlobals( force_python_objects = False ):
 
 
 def VimExpressionToPythonType( vim_expression ):
 def VimExpressionToPythonType( vim_expression ):
   result = vim.eval( vim_expression )
   result = vim.eval( vim_expression )
-  if not isinstance( result, str ):
-    return result
+  if not isinstance( result, str ) or isinstance( result, bytes ):
+    return ToUnicode( result )
   try:
   try:
     return int( result )
     return int( result )
   except ValueError:
   except ValueError: