diff options
author | Brandon Simmons <simmsbra@gmail.com> | 2023-01-17 19:48:07 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-01-17 19:48:07 +0000 |
commit | da3dd7d857ba4fb4bf408dedd1d9d6a2d5e2ae9f (patch) | |
tree | 4708aeb8921599d5e043349a0c8b9d7000b705dc /src/register.c | |
parent | 66bb9ae70f7371456ed76518076d2a344f8ab417 (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.c | 10 |
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 |