aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 72c75534d4..0bda14402f 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -2806,6 +2806,10 @@ static void op_yank_reg(oparg_T *oap, bool message, yankreg_T *reg, bool append)
curbuf->b_op_start.col = 0;
curbuf->b_op_end.col = MAXCOL;
}
+ if (yank_type != kMTLineWise && !oap->inclusive) {
+ // Exclude the end position.
+ decl(&curbuf->b_op_end);
+ }
}
}