aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index e905029dae..595a699563 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -3080,10 +3080,12 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
if (ve_flags == VE_ALL
&& (curwin->w_cursor.coladd > 0
|| endcol2 == curwin->w_cursor.col)) {
- if (dir == FORWARD && c == NUL)
- ++col;
- if (dir != FORWARD && c != NUL)
- ++curwin->w_cursor.col;
+ if (dir == FORWARD && c == NUL) {
+ col++;
+ }
+ if (dir != FORWARD && c != NUL && curwin->w_cursor.coladd > 0) {
+ curwin->w_cursor.col++;
+ }
if (c == TAB) {
if (dir == BACKWARD && curwin->w_cursor.col)
curwin->w_cursor.col--;