summaryrefslogtreecommitdiffstats
path: root/src/register.c
diff options
context:
space:
mode:
authorBrandon Simmons <simmsbra@gmail.com>2023-01-17 19:48:07 +0000
committerBram Moolenaar <Bram@vim.org>2023-01-17 19:48:07 +0000
commitda3dd7d857ba4fb4bf408dedd1d9d6a2d5e2ae9f (patch)
tree4708aeb8921599d5e043349a0c8b9d7000b705dc /src/register.c
parent66bb9ae70f7371456ed76518076d2a344f8ab417 (diff)
patch 9.0.1213: adding a line below the last one does not expand foldv9.0.1213
Problem: Adding a line below the last one does not expand fold. Solution: Do not skip mark_adjust() when adding lines below the last one. (Brandon Simmons, closes #11832, closes #10698)
Diffstat (limited to 'src/register.c')
-rw-r--r--src/register.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/register.c b/src/register.c
index bc687c0b13..3454cfaa61 100644
--- a/src/register.c
+++ b/src/register.c
@@ -2208,15 +2208,7 @@ error:
if (dir == FORWARD)
curbuf->b_op_start.lnum++;
}
- // Skip mark_adjust when adding lines after the last one, there
- // can't be marks there. But still needed in diff mode.
- if (curbuf->b_op_start.lnum + (y_type == MCHAR) - 1 + nr_lines
- < curbuf->b_ml.ml_line_count
-#ifdef FEAT_DIFF
- || curwin->w_p_diff
-#endif
- )
- mark_adjust(curbuf->b_op_start.lnum + (y_type == MCHAR),
+ mark_adjust(curbuf->b_op_start.lnum + (y_type == MCHAR),
(linenr_T)MAXLNUM, nr_lines, 0L);
// note changed text for displaying and folding