To: vim-dev@vim.org Subject: Patch 6.0.150 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.150 Problem: When using a multi-byte encoding, patch 6.0.148 causes "p" to work like "P". (Sung-Hyun Nam) Solution: Compute the byte length of a multi-byte character. Files: src/ops.c *** ../vim60.149/src/ops.c Tue Jan 22 16:51:24 2002 --- src/ops.c Thu Jan 24 11:23:26 2002 *************** *** 2780,2788 **** struct block_def bd; char_u *insert_string = NULL; int allocated = FALSE; - #ifdef FEAT_MBYTE - int bytelen = 0; - #endif long cnt; #ifdef FEAT_CLIPBOARD --- 2780,2785 ---- *************** *** 2983,2989 **** #ifdef FEAT_MBYTE if (has_mbyte) /* move to start of next multi-byte character */ ! curwin->w_cursor.col += bytelen; else #endif #ifdef FEAT_VIRTUALEDIT --- 2980,2986 ---- #ifdef FEAT_MBYTE if (has_mbyte) /* move to start of next multi-byte character */ ! curwin->w_cursor.col += (*mb_ptr2len_check)(ml_get_cursor()); else #endif #ifdef FEAT_VIRTUALEDIT *************** *** 3148,3153 **** --- 3145,3152 ---- #ifdef FEAT_MBYTE if (has_mbyte) { + int bytelen = (*mb_ptr2len_check)(ml_get_cursor()); + /* put it on the next of the multi-byte character. */ col += bytelen; if (yanklen) *** ../vim60.149/src/version.c Tue Jan 22 17:42:37 2002 --- src/version.c Thu Jan 24 11:26:36 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 150, /**/ -- hundred-and-one symptoms of being an internet addict: 47. You are so familiar with the WWW that you find the search engines useless. /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim ))) \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///