diff options
author | Daniel Hahler <git@thequod.de> | 2019-06-09 16:00:52 +0200 |
---|---|---|
committer | Daniel Hahler <git@thequod.de> | 2019-08-07 14:21:23 +0200 |
commit | 83d35e62f29aceebe3ccff961faef5a966aa8807 (patch) | |
tree | 5aadb92c6964af7a129aa03a9fa1d8872a6c9637 /src/nvim/change.c | |
parent | d9f2d53239b5d83f1e703508e44e4f09c68a108d (diff) | |
download | rneovim-83d35e62f29aceebe3ccff961faef5a966aa8807.tar.gz rneovim-83d35e62f29aceebe3ccff961faef5a966aa8807.tar.bz2 rneovim-83d35e62f29aceebe3ccff961faef5a966aa8807.zip |
move appended_lines_mark
Diffstat (limited to 'src/nvim/change.c')
-rw-r--r-- | src/nvim/change.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c index 4267429c25..b430f220d9 100644 --- a/src/nvim/change.c +++ b/src/nvim/change.c @@ -341,18 +341,14 @@ void appended_lines(linenr_T lnum, long count) /* * Like appended_lines(), but adjust marks first. */ - void -appended_lines_mark(linenr_T lnum, long count) +void appended_lines_mark(linenr_T lnum, long count) { - // Skip mark_adjust when adding a line after the last one, there can't - // be marks there. But it's still needed in diff mode. - if (lnum + count < curbuf->b_ml.ml_line_count -#ifdef FEAT_DIFF - || curwin->w_p_diff -#endif - ) - mark_adjust(lnum + 1, (linenr_T)MAXLNUM, count, 0L); - changed_lines(lnum + 1, 0, lnum + 1, count); + // Skip mark_adjust when adding a line after the last one, there can't + // be marks there. But it's still needed in diff mode. + if (lnum + count < curbuf->b_ml.ml_line_count || curwin->w_p_diff) { + mark_adjust(lnum + 1, (linenr_T)MAXLNUM, count, 0L, false); + } + changed_lines(lnum + 1, 0, lnum + 1, count, true); } /* |