-*fold.txt* For Vim version 7.4. Last change: 2015 Nov 24
+*fold.txt* For Vim version 7.4. Last change: 2016 Jan 02
VIM REFERENCE MANUAL by Bram Moolenaar
When using an operator, a closed fold is included as a whole. Thus "dl"
deletes the whole closed fold under the cursor.
-For Ex commands 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: >
+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.
correct_range(&ea);
#ifdef FEAT_FOLDING
- if (((ea.argt & WHOLEFOLD) || ea.addr_count >= 2) && !global_busy)
+ if (((ea.argt & WHOLEFOLD) || ea.addr_count >= 2) && !global_busy
+ && ea.addr_type == ADDR_LINES)
{
/* Put the first line at the start of a closed fold, put the last line
* at the end of a closed fold. */