diff options
author | Bram Moolenaar <bram@vim.org> | 2012-04-20 13:46:08 +0200 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2012-04-20 13:46:08 +0200 |
commit | 5bacb94c57cd7cf419d7c6856ea9b2c38f4ec899 (patch) | |
tree | 0c0c188f7a219adc5596884231cffe896fcc554e | |
parent | 08b60d93bd20c971ed8423dccf709452322c84d1 (diff) | |
download | vim-5bacb94c57cd7cf419d7c6856ea9b2c38f4ec899.tar.gz |
Problem: The behavior of the "- register changes depending on value of
the 'clipboard' option. (Szamotulski)
Solution: Also set the "- register when the register is "*" or "+".
(Christian Brabandt)
-rw-r--r-- | src/ops.c | 11 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 10 insertions, 3 deletions
@@ -1720,9 +1720,14 @@ op_delete(oap) did_yank = TRUE; } - /* Yank into small delete register when no register specified and the - * delete is within one line. */ - if (oap->regname == 0 && oap->motion_type != MLINE + /* Yank into small delete register when no named register specified + * and the delete is within one line. */ + if (( +#ifdef FEAT_CLIPBOARD + ((clip_unnamed & CLIP_UNNAMED) && oap->regname == '*') || + ((clip_unnamed & CLIP_UNNAMED_PLUS) && oap->regname == '+') || +#endif + oap->regname == 0) && oap->motion_type != MLINE && oap->line_count == 1) { oap->regname = '-'; diff --git a/src/version.c b/src/version.c index b2f26a9b..ed92464a 100644 --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 498, +/**/ 497, /**/ 496, |