浏览代码

Merge pull request #774 from syhkiller/syh_try_to_fix_issue_#761

fix Issue #761
Val Markovic 11 年之前
父节点
当前提交
b3a77e9464
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      python/ycm/vimsupport.py

+ 1 - 1
python/ycm/vimsupport.py

@@ -311,7 +311,7 @@ def EchoText( text, log_as_message = True ):
 # Echos text but truncates it so that it all fits on one line
 def EchoTextVimWidth( text ):
   vim_width = GetIntValue( '&columns' )
-  truncated_text = str( text )[ : int( vim_width * 0.9 ) ]
+  truncated_text = text.encode('utf-8')[ : int( vim_width * 0.9 ) ]
   truncated_text.replace( '\n', ' ' )
 
   old_ruler = GetIntValue( '&ruler' )