-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28-May-2015 21:14, Christian Brabandt wrote:
> Hi Ingo!
> On Di, 26 Mai 2015, Ingo Karkat wrote:
> 
>> On 24-May-2015 13:15, Christian Brabandt wrote:
>>> On Mo, 18 Mai 2015, Ingo Karkat wrote:
>>>
>>>> Hello Vim developers,
>>>>
>>>> appending to the end of a visual blockwise selection can be done with
>>>> the A command. I just noticed that this doesn't work reliably any more
>>>> when
>>>> - lines are wrapped and the cursor is in a following screen line AND
>>>> - :set linebreak
>>>> This happens with "real" blocks as well as a corner case single-line
>>>> blockwise selection.
>>>> To reproduce:
>>>>
>>>>     vim -N -u NONE
>>>>     :set linebreak
>>>>     :normal! 40afoo bar
>>>>     :normal! BB^VeAX
>>>> Appending should be after the selected word ("barfooX"), but it occurs
>>>> at the beginning instead ("Xbarfoo").
>>>>
>>>> I've bisected this down to the following patch:
>>>>
>>>> ,----[ bad change ]----
>>>> | 7.4.576  redrawing problem with 'relativenumber' and 'linebreak'
>>>> `----
>>>>
>>>> Attached is a test that verifies the correct behavior.
>>>>
>>>> I can reproduce this on Vim version 7.4.716 on Windows/x64 as well as on
>>>> latest Vim 7.4.729 on Linux/x64.
>>>>
>>>
>>> I can reproduce it. Thanks for the feedback. Looks like one needs to 
>>> recalculate the virtual column numbers after resetting the linebreak 
>>> option. This also happens for the OP_REPLACE part. Here is a patch, 
>>> including your testcase.
>>
>> Thank you Christian! Unfortunately, there's still an off-by-one error
>> with :set selection=exclusive; the cursor is positioned one character
>> left of the selection's end (resulting in "barfoXo" in the test).
>>
>> I hope that is easy to fix; it might also be worthwhile to test that
>> variation, too.
> 
> Updated patch and test attached.

Thank you very much! I can confirm that this indeed fixes the problem,
with both values of 'selection'. The test with a selection that ends in
a multibyte character is a good idea, too!

- -- regards, ingo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJVaBfgAAoJEA7ziXlAzQ/vWncH/RD1olqSK+ROsGLesaaB1+UV
L611Wwe/EOYXZ5Wmtvl2peP8DxXPfsJnz3kW09Jl/KmquMb7QqicqX9sflcJyAin
nA2m390mItXPHm1cCZIF9Q2oNcILSlEumjM0I0dRfD+ioNMYpTN6GFWa7XtOG1i2
9wcCDB7SWuh/nDqi5HOKJR+QFP91jSg4rWN+jn22ehTDC9BH5NFq7kf6MYNbQH/Y
aQo61fbEopnf1sc6JhGyKhYCxebSWNoolvK7Mq8UtVm+yeKLcBbIEFhLxh/2qKyZ
fPvP3Yjb69ZBmGkFBhmf6gbso7iVWeBPv9NJ9pY950b7NVkvEZmCryW2xZv8+k8=
=y9pv
-----END PGP SIGNATURE-----

-- 
-- 
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/d/optout.

Raspunde prin e-mail lui