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.

Here's an example.  Create a file, fold_test, as shown.

---------------------------- fold_test ----------------------------
{{{1
line 2
line 3
line 4
line 5
}}}1
line 7
line 8
line 9
line 10
 vim: fdm=marker
-------------------------------------------------------------------

Then edit that file as follows.

    $ vim -N -u NONE -i NONE fold_test

Note that lines 1 through 6 are folded.  Do the following.

    :3s/line/dog/
    zR

Note that "line" has been changed to "dog" in lines 2 through 5.
Then do the following.

    :3s/dog/cat/

Note that "dog" has been changed to "cat" in only line 3, as
expected.  The result looks like this.

    {{{1
    dog 2
    cat 3
    dog 4
    dog 5
    }}}1
    line 7
    line 8
    line 9
    line 10
     vim: fdm=marker

That an explicit substitution on one line affects all lines in the
closed fold looks like a bug to me.  It is certainly unexpected.

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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui