Tony Mechelynck wrote:
On 25/05/10 22:37, Bram Moolenaar wrote:

Charles Campbell wrote:

Set up a file<tmp> with a single line: (this line should appear as a -1
with a "m" exponent; ie. char-0x1D50
-1áµ

Use the following command:
vim -u simple.vimrc tmp

and try Yp (yank and put).

<simple.vimrc>:
set nocp
set enc=utf-8

I see

--11áµ

instead of
-1áµ
-1áµ

ie. its picking up the -1 but ignoring the "m" exponent.

I can't reproduce it...


Neither can I. (My OS locale is en_US.UTF-8 so I started Vim with

    vim -u NONE -N minus-one-em.txt

). Which Vim version? I tried Vim 7.3a c81f0a037059 (Mon May 24 22:06:04 2010 +0200 "And another small fix for persistent undo.") and also Vim 7.2.437. My file minus-one-em.txt contains your three characters and a linefeed, no BOM (hex 2D 31 E1 B5 90 0A).

I see what you describe when doing y0p or y^p instead (starting at the exponent-m in Normal mode), which is normal since 0 and ^ are "exclusive" motions. y$p (starting in column 1) gives --1ᵐ1ᵐ which is also normal since $ is "inclusive".
Hello, here's my version info:

:version
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled May 25 2010 15:45:25)
Included patches: 1-438
Compiled by [email protected]
Huge version with GTK2 GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope +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 +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra +perl +postscript +printer +profile +python +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
  system vimrc file: "$VIM/vimrc"
    user vimrc file: "$HOME/.vimrc"
     user exrc file: "$HOME/.exrc"
 system gvimrc file: "$VIM/gvimrc"
   user gvimrc file: "$HOME/.gvimrc"
   system menu file: "$VIMRUNTIME/menu.vim"
 fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/inclu de -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -D_FORTIFY_SOURCE=1 -D_REENTRANT -D_GNU_SOURCE -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linu
x-thread-multi/CORE  -I/usr/include/python2.4 -pthread
Linking: gcc -L/lib64 -Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -L/usr/local/lib -o vim -L/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject- 2.0 -lgmodule-2.0 -lglib-2.0 -lXt -lncurses -lselinux -lacl -lgpm -Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/auto/DynaLoader/DynaLoader.a -L/usr/lib64/p erl5/5.8.8/x86_64-linux-thread-multi/CORE -lperl -lresolv -lutil -lc -L/usr/lib/python2.4/config -lpython2.4 -lutil -lm -Xlinker -export-dynamic

It also occurs with
:version
VIM - Vi IMproved 7.3 BETA (2010 May 15, compiled May 19 2010 15:09:27)
Compiled by [email protected]
Huge version with GTK2 GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope +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 +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra +perl +postscript +printer +profile +python +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
  system vimrc file: "$VIM/vimrc"
    user vimrc file: "$HOME/.vimrc"
     user exrc file: "$HOME/.exrc"
 system gvimrc file: "$VIM/gvimrc"
   user gvimrc file: "$HOME/.gvimrc"
   system menu file: "$VIMRUNTIME/menu.vim"
 fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/u sr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -D_FORTIFY_SOURCE=1 -D_REENTRANT -D_GNU_SOURCE -I/usr/local/include -D_LAR GEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -I/usr/include/python2.4 -pthread Linking: gcc -L/lib64 -Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -L/usr/local/lib -o vim -L/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lXt -lncurses -lselinux -lacl -lgpm -Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/auto/DynaLoader/DynaLoader.a -L/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -lperl -lresolv -lutil -lc -L/usr/lib/python2.4/confi
g -lpython2.4 -lutil -lm -Xlinker -export-dynamic


Here's my locale env-vars:
LANG=en_US.UTF-8
LC_CTYPE=en_US

Using the -N option, I'm afraid, doesn't change the behavior. An additional oddity: The file with one line, "-1ᵐ" yields "--11ᵐ" (with cursor at far left side; evidently the yank isn't picking up the newline or the ᵐ). However, with " -1ᵐ" (note the initial blank), a Yp does work as expected. I've done this on a centos V machine (ie. a form of linux). I've also repeated the same behavior with numerous other utf-8 characters (25 superscript characters, lower case Greek). I'll try this again on a different machine when I get a chance. I didn't expect the font to affect this; I've now tried several, and the same behavior occurs. I find it odd that no one else seems to be able to duplicate this.

Regards,
Chip Campbell


--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui