From cfabd89c0fc15f81bbdfc08f65c79e15e58709de Mon Sep 17 00:00:00 2001 From: wuhy Date: Mon, 18 Sep 2017 14:53:48 +0800 Subject: [PATCH] fixed encoding bug of balloon --- autoload/tagbar.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index a087b3c..b4322fb 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -3182,7 +3182,15 @@ function! TagbarBalloonExpr() abort return '' endif - return taginfo.getPrototype(0) + let prototype = taginfo.getPrototype(0) + if has('multi_byte') + if g:tagbar_systemenc != &encoding + let prototype = iconv(prototype, &encoding, g:tagbar_systemenc) + elseif $LANG != '' + let prototype = iconv(prototype, &encoding, $LANG) + endif + endif + return prototype endfunction " Autoload functions {{{1