From 436a83475810a761a49f371da6a0ca797f8b4b30 Mon Sep 17 00:00:00 2001 From: Sun Yuanhui Date: Mon, 13 Jan 2014 21:06:21 +0800 Subject: [PATCH] fix Issue #761 --- python/ycm/vimsupport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ycm/vimsupport.py b/python/ycm/vimsupport.py index 824743aa..5aad020b 100644 --- a/python/ycm/vimsupport.py +++ b/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' )