From 80631b1aaf56ad1cbfba60776e4e6712a0a7b709 Mon Sep 17 00:00:00 2001 From: Val Markovic Date: Tue, 1 Mar 2016 19:14:06 -0800 Subject: [PATCH] Enforcing unicode in more vimsupport functions --- 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 28ab8e4b..be55e3e0 100644 --- a/python/ycm/vimsupport.py +++ b/python/ycm/vimsupport.py @@ -319,8 +319,8 @@ def GetReadOnlyVimGlobals( force_python_objects = False ): def VimExpressionToPythonType( 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: return int( result ) except ValueError: