aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 4e0bdb777c..98eda8dcb8 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -3269,9 +3269,10 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout,
*cmd++ = NUL; /* replace it with a NUL */
break;
}
- if (cmd[0] == '\\' && cmd[1] != 0) /* skip escaped characters */
- ++cmd;
- mb_ptr_adv(cmd);
+ if (cmd[0] == '\\' && cmd[1] != 0) { // skip escaped characters
+ cmd++;
+ }
+ MB_PTR_ADV(cmd);
}
if (!eap->skip && !preview) {