Loading ...
Sorry, an error occurred while loading the content.

2565All of getpos, col, vim.current.window.cursor report wrong col number on multibyte line

Expand Messages
  • Angri
    Dec 13, 2008
      They calculate col number counting bytes, not chars.

      Also :python vim.current.line and :python vim.current.buffer holds
      data in strings encoded in utf-8, but it should be python unicode
      objects, I think.

      $ LANG=en vim --version
      VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Dec 8 2008 05:09:35)
      Included patches: 1-65
      Compiled by ArchLinux
      Big version without GUI. Features included (+) or not (-):
      +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset
      +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
      +cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
      +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
      +float +folding -footer +fork() +gettext -hangul_input +iconv
      +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds
      +menu +mksession +modify_fname +mouse -mouseshape +mouse_dec
      -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte
      +multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra +perl
      +printer -profile +python +quickfix +reltime +rightleft +ruby
      +signs +smartindent -sniff +statusline -sun_workshop +syntax
      +tag_old_static -tag_any_white -tcl +terminfo +termresponse
      +textobjects +title
      -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra
      +vreplace +wildignore +wildmenu +windows +writebackup +X11 +xfontset -
      +xsmp_interact +xterm_clipboard -xterm_save
      system vimrc file: "/etc/vimrc"
      user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
      fall-back for $VIM: "/usr/share/vim"
      Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -march=x86-64 -
      mtune=generic -O2 -pipe -D_FORTIFY_SOURCE=1 -D_REENTRANT -
      D_GNU_SOURCE -I/usr/local/include -D_LARGEFILE_SOURCE -
      D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/core_perl/CORE -I/usr/include/
      python2.6 -pthread -I/usr/lib/ruby/1.8/x86_64-linux
      Linking: gcc -L. -rdynamic -Wl,-export-dynamic -Wl,-E -L/usr/
      local/lib -o vim -lXt -lncurses -lacl -lgpm -Wl,-E -L/usr/local/
      lib -L/usr/lib/perl5/core_perl/CORE -lperl -lutil -lc -L/usr/lib/
      python2.6/config -lpython2.6 -lutil -Xlinker -export-dynamic -Wl,-R -
      Wl,/usr/lib -L/usr/lib -lruby -lm

      You received this message from the "vim_multibyte" maillist.
      For more information, visit http://www.vim.org/maillist.php