summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-10-31 13:54:25 +0100
committerBram Moolenaar <Bram@vim.org>2014-10-31 13:54:25 +0100
commit6a64365c952895ecc2219b303d9bf64dabf8f2e7 (patch)
tree24cdbbf8fd4c44e442c18f519ecb488dfee4f97e
parentfe3c41009887331dc9fee2bedf457728117be544 (diff)
downloadvim-git-6a64365c952895ecc2219b303d9bf64dabf8f2e7.tar.gz
updated for version 7.4.490v7.4.490
Problem: Cannot specify the buffer to use for "do" and "dp", making them useless for three-way diff. Solution: Use the count as the buffer number. (James McCoy)
-rw-r--r--src/diff.c12
-rw-r--r--src/normal.c4
-rw-r--r--src/proto/diff.pro2
-rw-r--r--src/version.c2
4 files changed, 15 insertions, 5 deletions
diff --git a/src/diff.c b/src/diff.c
index d324f99d8..caee6e5a5 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -2107,12 +2107,20 @@ diff_infold(wp, lnum)
* "dp" and "do" commands.
*/
void
-nv_diffgetput(put)
+nv_diffgetput(put, count)
int put;
+ long count;
{
exarg_T ea;
+ char_u buf[30];
- ea.arg = (char_u *)"";
+ if (count == 0)
+ ea.arg = (char_u *)"";
+ else
+ {
+ vim_snprintf((char *)buf, 30, "%ld", count);
+ ea.arg = buf;
+ }
if (put)
ea.cmdidx = CMD_diffput;
else
diff --git a/src/normal.c b/src/normal.c
index 0116d058b..bd5bacd59 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -9284,7 +9284,7 @@ nv_put(cap)
if (cap->oap->op_type == OP_DELETE && cap->cmdchar == 'p')
{
clearop(cap->oap);
- nv_diffgetput(TRUE);
+ nv_diffgetput(TRUE, cap->opcount);
}
else
#endif
@@ -9407,7 +9407,7 @@ nv_open(cap)
if (cap->oap->op_type == OP_DELETE && cap->cmdchar == 'o')
{
clearop(cap->oap);
- nv_diffgetput(FALSE);
+ nv_diffgetput(FALSE, cap->opcount);
}
else
#endif
diff --git a/src/proto/diff.pro b/src/proto/diff.pro
index 18c42651f..3234fde1a 100644
--- a/src/proto/diff.pro
+++ b/src/proto/diff.pro
@@ -18,7 +18,7 @@ int diffopt_changed __ARGS((void));
int diffopt_horizontal __ARGS((void));
int diff_find_change __ARGS((win_T *wp, linenr_T lnum, int *startp, int *endp));
int diff_infold __ARGS((win_T *wp, linenr_T lnum));
-void nv_diffgetput __ARGS((int put));
+void nv_diffgetput __ARGS((int put, long count));
void ex_diffgetput __ARGS((exarg_T *eap));
int diff_mode_buf __ARGS((buf_T *buf));
int diff_move_to __ARGS((int dir, long count));
diff --git a/src/version.c b/src/version.c
index 1ef081855..3fc09c83c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 490,
+/**/
489,
/**/
488,