-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03-May-2015 03:52, h_east wrote:
> Hello Ingo! 2015/5/3(Sun) 4:46:50 UTC+9 Ingo Karkat:
>> Hello Vim developers,
>>
>> if you do a :substitute/foo/bar/c and then choose (a)ll as the
>> answer, a repeat of the substitution via g& or :&& does not
>> confirm each substitution any more; i.e. the :s_c flag is *not*
>> kept!
>>
>> The documentation of g& and :s_& explicitly state that they "Keep
>> the flags from the previous substitute command".
>>
>> Likewise, answering (l)ast omits a given :s_g flag on
>> repetition.
>>
>>
>> The problem is that the static flags do_all and do_ask are
>> modified by the answers, and the modified answers are then reused
>> on repetition, whereas the original ones should be restored in
>> that case. From do_sub() :
>>
>> static int do_all = FALSE; /* do multiple substitutions per line
>> */ static int do_ask = FALSE; /* ask for confirmation */
>>
>> [...] if (typed == 'l') { /* last: replace and then stop */
>> do_all = FALSE; line2 = lnum; break; } if (typed == 'a') { do_ask
>> = FALSE; break; }
>>
>> Note: This was originally raised on Stack Overflow:
>> http://stackoverflow.com/questions/30000450/why-vim-does-not-preserve
- -c-
>>
>>
flag-when-g-used
>
> I understand this problem. I think this should be corrected. So, I
> wrote a patch. Please confirm this.
>
> Thanks.
I can confirm that this fixes both reported problems. ?????????
- -- regards, ingo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
iQEcBAEBAgAGBQJVRzhvAAoJEA7ziXlAzQ/vmQEH/Ax7zP3oTc+4YZxukNrgU0aB
F68V01Pn3+m2EFE5n+5jyAY3HXZG6wgzXqFga71+rE7HoqJMtPY6/WPoT8Wr0y0n
+82JwkV0v+9JBYiywEGliTohKWMdepYQc4EHOsEI+dosiP9YoKvREU+tumZVQ5KL
UdiKVUkZd3xXsyv7VX4bF+6/sS6KBZ+umnnsFagrNddPD1IsCXBQHoLxYWTHTo0z
iTg/B7yOFhPtQII4WjExWzPon8L17TVgrgi1BmWC/xudlP8yP/1BRxONCJzbDfdb
IaJedmceMxsO9/SjFcdXNK3a+DgnF/GqVBLpXSL2BUUNihhUOxeZr7FRk/gC/U4=
=Z94K
-----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.