James McCoy wrote:
> On Sat, Aug 01, 2015 at 04:27:53AM +0200, Dominique Pellé wrote:
>> Hi
>>
>> Vim-7.4.803 (and older) accesses invalid memory beyond end of
>> string when doing:
>>
>> $ vim -u NONE -c 'exe "sc"'
>>
>> Bug is fixed in attached patch.
>>
>> Apparently, ":sc" is doing a :substitute command with the
>> 'c' flag. I could not find where it is documented, but perhaps
>> I missed it in the doc.
>
> :[range]s[ubstitute] [flags] [count]
> :[range]&[&][flags] [count] *:&*
> …
> The space between `:substitute` and the 'c', 'g' and
> 'r' flags isn't required, but in scripts it's a good
> idea to keep it to avoid confusion.
Thanks James,
OK, so :sc is documented after all. But the documentation
is incomplete. It's missing flags 'i' and 'I'. See attached doc patch.
Regards
Dominique
--
--
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.
diff -r 893d1ea575c9 runtime/doc/change.txt
--- a/runtime/doc/change.txt Tue Jul 28 21:17:37 2015 +0200
+++ b/runtime/doc/change.txt Sat Aug 01 04:55:23 2015 +0200
@@ -634,9 +634,9 @@
may add [flags], see |:s_flags|.
Note that after `:substitute` the '&' flag can't be
used, it's recognized as a pattern separator.
- The space between `:substitute` and the 'c', 'g' and
- 'r' flags isn't required, but in scripts it's a good
- idea to keep it to avoid confusion.
+ The space between `:substitute` and the 'c', 'g',
+ 'i', 'I' and 'r' flags isn't required, but in scripts
+ it's a good idea to keep it to avoid confusion.
:[range]~[&][flags] [count] *:~*
Repeat last substitute with same substitute string