On 2017-12-13, 'Andy Wokula' via vim_dev wrote:
> Am 13.12.2017 um 18:57 schrieb Gary Johnson:
> >I've had a bug in one of my plugins that I finally traced to what
> >appears to be a bug in Vim (8.0.1257):  a substitution on one line
> >of a closed fold affects all lines in that fold.

> Works as documented:
>     :h fold-behavior
> 
> For Ex commands that work on buffer lines the range is adjusted to always
> start at the first line of a closed fold and end at the last line of a closed
> fold.  Thus this command: >
>       :s/foo/bar/g
> when used with the cursor on a closed fold, will replace "foo" with "bar" in
> all lines of the fold.
> 
> Also try simpler commands like
>     :#
>     :.#
> on a closed fold.

Thank you.  I guess I'll change my plugin to open the fold before
performing the substitution.

Regards,
Gary

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