lalitmetkar / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

+ballooneval put invalid charactors in v:beval_text #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. type in some multibyte charactor, e.g. 这是 
2. set balloonexpr=v:beval_text
3. place the cursor near the end of 是

What is the expected output? What do you see instead?
see 这是
but I see <af> instead.

What version of the product are you using? On what operating system?
vim.7.3.479 on GNU Linux

Please provide any additional information below.

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Mar 24 2012 01:04:03)
包含补丁: 1-479
编译者 fermat@debian
巨型版本 带 GTK2 图形界面。
  可使用(+)与不可使用(-)的功能:
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff 
+digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi 
+file_in_path +find_in_path +float +folding -footer +fork() +gettext 
-hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall 
+linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname 
+mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm 
-mouse_sysmouse +mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme 
+netbeans_intg +path_extra +perl +persistent_undo +postscript +printer +profile
 -python +python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs 
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary 
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
 +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo 
+vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim 
+xsmp_interact +xterm_clipboard -xterm_save 
     系统 vimrc 文件: "$VIM/vimrc"
     用户 vimrc 文件: "$HOME/.vimrc"
      用户 exrc 文件: "$HOME/.exrc"
    系统 gvimrc 文件: "$VIM/gvimrc"
    用户 gvimrc 文件: "$HOME/.gvimrc"
        系统菜单文件: "$VIMRUNTIME/menu.vim"
         $VIM 预设值: "/usr/share/vim"
编译方式: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread 
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include     -g -O2 
-D_FORTIFY_SOURCE=1      
链接方式: gcc   -L.  -rdynamic -Wl,-export-dynamic  -Wl,-E   
-L/usr/local/lib -Wl,--as-needed -o vim   -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 
-latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lcairo 
-lgio-2.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 
-lgthread-2.0 -lrt -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE 
-lm -lncurses -lnsl  -lselinux  -lacl -lattr -lgpm    -Wl,-E  -fstack-protector 
-L/usr/local/lib  -L/usr/lib/perl/5.10/CORE -lperl -ldl -lm -lpthread -lcrypt  
-L/usr/local/lib/python3.2/config-3.2m -lpython3.2m -lpthread -ldl -lutil -lm  
-lruby1.8 -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib   

Original issue reported on code.google.com by Fermat...@gmail.com on 23 Mar 2012 at 6:42

GoogleCodeExporter commented 9 years ago
The attached patch fixes issue #58.

Note that bug also happened with latin1 non-ASCII characters such as é:

1. type in some multibyte character in gvim such as café
2. set balloonexpr=v:beval_text
3. place the cursor near the end of the word café and notice that balloon 
displayed <a9> in balloon.

Also balloon content was broken when putting mouse on visual selection with 
multibyte characters (also fixed by attached patch).

Original comment by dominiqu...@gmail.com on 29 Sep 2012 at 6:26

Attachments:

GoogleCodeExporter commented 9 years ago
Fix included as patch 7.3.695

Original comment by brammool...@gmail.com on 20 Oct 2012 at 10:55