Hi Marcin!
On Mo, 26 Nov 2012, Marcin Szamotulski wrote:
> On 10:24 Mon 26 Nov , Christian Brabandt wrote:
> > Whatever I do, Vim always overwrite the - register. I didn't see any
> > difference with or without setting 'cb', Vim always overwrites the
> > small delete register and puts that newly yanked part.
Here is a small patch and test:
diff --git a/src/normal.c b/src/normal.c
--- a/src/normal.c
+++ b/src/normal.c
@@ -9410,7 +9410,8 @@
# ifdef FEAT_CLIPBOARD
adjust_clip_reg(®name);
# endif
- if (regname == 0 || regname == '"' || VIM_ISDIGIT(regname)
+ if (regname == 0 || regname == '"'
+ || VIM_ISDIGIT(regname) || regname == '-'
# ifdef FEAT_CLIPBOARD
|| (clip_unnamed && (regname == '*' || regname == '+'))
# endif
diff --git a/src/testdir/test48.in b/src/testdir/test48.in
--- a/src/testdir/test48.in
+++ b/src/testdir/test48.in
@@ -54,8 +54,12 @@
^Oi^Ei^Ei^E <-- should show the name of a noted text editor
^oi^Yi^Yi^Y <-- and its version numberdd
:"
+:" Test for yanking and pasting using the small delete register
+gg/^foo
+dewve"-p
:wq! test.out
ENDTEST
+foo, bar
keyword keyw
all your base are belong to us
1 2 3 4 5 6
diff --git a/src/testdir/test48.ok b/src/testdir/test48.ok
--- a/src/testdir/test48.ok
+++ b/src/testdir/test48.ok
@@ -1,3 +1,4 @@
+, foo
keyword keyword
all your base
are belong to vim
regards,
Christian
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php