Skip to content

Commit

Permalink
updated for version 7.3.761
Browse files Browse the repository at this point in the history
Problem:    In Visual mode a "-p does not work. (Marcin Szamotulski)
Solution:   Avoid writing to "- before putting it. (Christian Brabandt)
  • Loading branch information
brammool committed Dec 12, 2012
1 parent 83dadaf commit ba6e858
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/normal.c
Original file line number Diff line number Diff line change
Expand Up @@ -9412,14 +9412,15 @@ nv_put(cap)
# ifdef FEAT_CLIPBOARD
adjust_clip_reg(&regname);
# endif
if (regname == 0 || regname == '"' || VIM_ISDIGIT(regname)
if (regname == 0 || regname == '"'
|| VIM_ISDIGIT(regname) || regname == '-'
# ifdef FEAT_CLIPBOARD
|| (clip_unnamed && (regname == '*' || regname == '+'))
# endif

)
{
/* the delete is going to overwrite the register we want to
/* The delete is going to overwrite the register we want to
* put, save it first. */
reg1 = get_register(regname, TRUE);
}
Expand Down
4 changes: 4 additions & 0 deletions src/testdir/test48.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ $5lrxa<-- should be 'x'
^O3li4li4li <-- should show the name of a noted text editor
^o4li4li4li <-- and its version number-dd
:"
:" 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
Expand Down
1 change: 1 addition & 0 deletions src/testdir/test48.ok
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
, foo
keyword keyword
all your base
are belong to vim
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
761,
/**/
760,
/**/
Expand Down

0 comments on commit ba6e858

Please sign in to comment.