On 21-Nov-2013 07:54 +0100, Christian Brabandt wrote:

> On Wed, November 20, 2013 20:58, Christian Brabandt wrote:
>> On Mi, 20 Nov 2013, Ingo Karkat wrote:
>>> the automated test suite of one of my plugins caught a regression,
>>> caused by
>>>
>>> ,----[ patch 7.4.034 ]----
>>> | using "p" in Visual block mode only changes the first line
>>> `----
>>>
>>> The steps to reproduce are a bit strange, but not unusual when used in a
>>> plugin. It's based on pasting over a characterwise visual selection that
>>> ends at the end of the current line via "p" while :set virtualedit=all,
>>> then clearing virtualedit. I've used the attached script with "hg
>>> bisect"; it'll exit with 1 when the bug is present.
> 
> I think, this patch is a little better:
> 
>  diff --git a/src/ops.c b/src/ops.c
>  --- a/src/ops.c
>  +++ b/src/ops.c
>  @@ -3818,7 +3818,11 @@
>                      ml_replace(lnum, newp, FALSE);
>                      /* Place cursor on last putted char. */
>                      if (lnum == curwin->w_cursor.lnum)
>  +                   {
>  +                       /* make sure curwin->w_virtcol is updated */
>  +                       curwin->w_valid = 0;
>                          curwin->w_cursor.col += (colnr_T)(totlen - 1);
>  +                   }
>                  }
>   #ifdef FEAT_VISUAL
>                  if (VIsual_active)

Thanks, Christian! I can confirm that above patch fixes the problem.

-- regards, ingo

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui