To:
[email protected]
Subject: Patch 6.1a.003
Fcc: outbox
From: Bram Moolenaar <
[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------
Patch 6.1a.003
Problem: Multi-byte: With UTF-8 double-wide char and 'virtualedit' set:
yanking in Visual mode doesn't include the last byte. (Eric Long)
Solution: Don't add a space for a double-wide character.
Files: src/ops.c
*** ../vim61a.002/src/ops.c Wed Feb 20 20:47:18 2002
--- src/ops.c Mon Feb 25 21:57:04 2002
***************
*** 2614,2625 ****
if (virtual_active())
{
getvcol(curwin, &oap->end, &cs, NUL, &ce);
! if (p[endcol] == NUL || cs + oap->end.coladd < ce)
{
- /* Special case: inside a single char */
if (oap->start.lnum == oap->end.lnum
&& oap->start.col == oap->end.col)
{
is_oneChar = TRUE;
bd.startspaces = oap->end.coladd
- oap->start.coladd + oap->inclusive;
--- 2614,2632 ----
if (virtual_active())
{
getvcol(curwin, &oap->end, &cs, NUL, &ce);
! if (p[endcol] == NUL || (cs + oap->end.coladd < ce
! # ifdef FEAT_MBYTE
! /* Don't add space for double-wide
! * char; endcol will be on last byte
! * of multi-byte char. */
! && (*mb_head_off)(p, p + endcol) == 0
! # endif
! ))
{
if (oap->start.lnum == oap->end.lnum
&& oap->start.col == oap->end.col)
{
+ /* Special case: inside a single char */
is_oneChar = TRUE;
bd.startspaces = oap->end.coladd
- oap->start.coladd + oap->inclusive;
*** ../vim61a.002/src/version.c Mon Feb 25 21:35:47 2002
--- src/version.c Mon Feb 25 22:00:25 2002
***************
*** 608,609 ****
--- 608,611 ----
{ /* Add new patch number below this line */
+ /**/
+ 3,
/**/
--
What a wonderfully exciting cough! Do you mind if I join you?
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
/// Bram Moolenaar --
[email protected] --
http://www.moolenaar.net \\\
/// Creator of Vim --
http://vim.sf.net --
ftp://ftp.vim.org/pub/vim \\\
\\\ Project leader for A-A-P --
http://www.a-a-p.org ///
\\\ Help me helping AIDS orphans in Uganda -
http://iccf-holland.org ///