summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ops.c b/src/ops.c
index 561046d37..f08e576cf 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -1623,6 +1623,7 @@ op_delete(oap)
#endif
linenr_T old_lcount = curbuf->b_ml.ml_line_count;
int did_yank = FALSE;
+ int orig_regname = oap->regname;
if (curbuf->b_ml.ml_flags & ML_EMPTY) /* nothing to do */
return OK;
@@ -1715,8 +1716,10 @@ op_delete(oap)
/*
* Put deleted text into register 1 and shift number registers if the
* delete contains a line break, or when a regname has been specified.
+ * Use the register name from before adjust_clip_reg() may have
+ * changed it.
*/
- if (oap->regname != 0 || oap->motion_type == MLINE
+ if (orig_regname != 0 || oap->motion_type == MLINE
|| oap->line_count > 1 || oap->use_reg_one)
{
y_current = &y_regs[9];