aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-06-11 23:43:14 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-06-12 02:00:50 -0400
commit3c7ea8d619d77d303e9c51118b22c81a3ffbf550 (patch)
treeef78d44a18dca24302546d98a67861940d471e5f /src/nvim/ops.c
parentfa2ad305e312c3e61e4943c345a4c34d4a1be18c (diff)
downloadrneovim-3c7ea8d619d77d303e9c51118b22c81a3ffbf550.tar.gz
rneovim-3c7ea8d619d77d303e9c51118b22c81a3ffbf550.tar.bz2
rneovim-3c7ea8d619d77d303e9c51118b22c81a3ffbf550.zip
vim-patch:8.0.0451: some macros are in lower case
Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice. https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 45de76f80a..c95345f9b2 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -406,8 +406,9 @@ static void shift_block(oparg_T *oap, int amount)
/* If "bd.startspaces" is set, "bd.textstart" points to the character,
* the part of which is displayed at the block's beginning. Let's start
* searching from the next character. */
- if (bd.startspaces)
- mb_ptr_adv(non_white);
+ if (bd.startspaces) {
+ MB_PTR_ADV(non_white);
+ }
/* The character's column is in "bd.start_vcol". */
non_white_col = bd.start_vcol;
@@ -443,7 +444,7 @@ static void shift_block(oparg_T *oap, int amount)
if (verbatim_copy_width + incr > destination_col)
break;
verbatim_copy_width += incr;
- mb_ptr_adv(verbatim_copy_end);
+ MB_PTR_ADV(verbatim_copy_end);
}
/* If "destination_col" is different from the width of the initial
@@ -2820,7 +2821,7 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
}
char_u *p = get_cursor_pos_ptr();
if (dir == FORWARD && *p != NUL) {
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
}
ptr = vim_strsave(p);
ml_append(curwin->w_cursor.lnum, ptr, (colnr_T)0, false);
@@ -2829,7 +2830,7 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
oldp = get_cursor_line_ptr();
p = oldp + curwin->w_cursor.col;
if (dir == FORWARD && *p != NUL) {
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
}
ptr = vim_strnsave(oldp, (size_t)(p - oldp));
ml_replace(curwin->w_cursor.lnum, ptr, false);
@@ -3632,10 +3633,10 @@ int do_join(size_t count,
if (insert_space && currsize > 0) {
if (has_mbyte) {
cend = curr + currsize;
- mb_ptr_back(curr, cend);
+ MB_PTR_BACK(curr, cend);
endcurr1 = (*mb_ptr2char)(cend);
if (cend > curr) {
- mb_ptr_back(curr, cend);
+ MB_PTR_BACK(curr, cend);
endcurr2 = (*mb_ptr2char)(cend);
}
} else {
@@ -4272,7 +4273,7 @@ static void block_prep(oparg_T *oap, struct block_def *bdp, linenr_T lnum, int i
bdp->pre_whitesp_c = 0;
}
prev_pstart = pstart;
- mb_ptr_adv(pstart);
+ MB_PTR_ADV(pstart);
}
bdp->start_char_vcols = incr;
if (bdp->start_vcol < oap->start_vcol) { /* line too short */