diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-09-05 14:18:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-09-05 14:18:45 +0200 |
commit | 7c82130a76898999bcebf28c71f0897644822fab (patch) | |
tree | c0de7b61f37404b7967d011339f11943ba4400c0 /src/ops.c | |
parent | 2c66669c33e7aab70db089c393bedc0f21ca33c7 (diff) | |
download | vim-git-7c82130a76898999bcebf28c71f0897644822fab.tar.gz |
updated for version 7.3.649v7.3.649
Problem: When 'clipboard' is set to "unnamed" small deletes end up in the
numbered registers. (Ingo Karkat)
Solution: Use the original register name to decide whether to put a delete
in a numbered register. (Christian Brabandt)
Diffstat (limited to 'src/ops.c')
-rw-r--r-- | src/ops.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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]; |