diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-03-12 18:23:53 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-03-12 18:23:53 +0100 |
commit | b5aedf3e228d35821591da9ae8501b61cf2e264c (patch) | |
tree | 39cdf29566db1e5ed8b2235d2b0240c859163bd8 /src/ex_cmds.c | |
parent | 8774845ce1a7def122ea07c057a79417f3be3d17 (diff) | |
download | vim-git-b5aedf3e228d35821591da9ae8501b61cf2e264c.tar.gz |
patch 8.0.0448: some macros are in lower casev8.0.0448
Problem: Some macros are in lower case, which can be confusing.
Solution: Make a few lower case macros upper case.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index c38687d74..05575ef70 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -851,24 +851,41 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest) * their final destination at the new text position -- webb */ last_line = curbuf->b_ml.ml_line_count; - mark_adjust(line1, line2, last_line - line2, 0L); - changed_lines(last_line - num_lines + 1, 0, last_line + 1, num_lines); + mark_adjust_nofold(line1, line2, last_line - line2, 0L); if (dest >= line2) { - mark_adjust(line2 + 1, dest, -num_lines, 0L); + mark_adjust_nofold(line2 + 1, dest, -num_lines, 0L); +#ifdef FEAT_FOLDING + win_T *win; + tabpage_T *tp; + + FOR_ALL_TAB_WINDOWS(tp, win) { + if (win->w_buffer == curbuf) + foldSwapRange(&win->w_folds, line1, line2, dest + 1, + dest + num_lines); + } +#endif curbuf->b_op_start.lnum = dest - num_lines + 1; curbuf->b_op_end.lnum = dest; } else { - mark_adjust(dest + 1, line1 - 1, num_lines, 0L); + mark_adjust_nofold(dest + 1, line1 - 1, num_lines, 0L); +#ifdef FEAT_FOLDING + win_T *win; + tabpage_T *tp; + + FOR_ALL_TAB_WINDOWS(tp, win) { + if (win->w_buffer == curbuf) + foldSwapRange(&win->w_folds, dest + 1, line1 - 1, line1, line2); + } +#endif curbuf->b_op_start.lnum = dest + 1; curbuf->b_op_end.lnum = dest + num_lines; } curbuf->b_op_start.col = curbuf->b_op_end.col = 0; - mark_adjust(last_line - num_lines + 1, last_line, + mark_adjust_nofold(last_line - num_lines + 1, last_line, -(last_line - dest - extra), 0L); - changed_lines(last_line - num_lines + 1, 0, last_line + 1, -extra); /* * Now we delete the original text -- webb @@ -4211,7 +4228,7 @@ do_ecmd( /* If autocommands change the cursor position or topline, we should * keep it. Also when it moves within a line. */ - if (!equalpos(curwin->w_cursor, orig_pos)) + if (!EQUAL_POS(curwin->w_cursor, orig_pos)) { newlnum = curwin->w_cursor.lnum; newcol = curwin->w_cursor.col; |