Merge pull request #1729 from fwalch/vim-7.4.490

vim-patch:7.4.490
This commit is contained in:
Justin M. Keyes 2015-01-19 08:52:29 -05:00
commit d0debe2432
3 changed files with 16 additions and 7 deletions

View File

@ -2017,17 +2017,24 @@ int diff_infold(win_T *wp, linenr_T lnum)
}
/// "dp" and "do" commands.
///
/// @param put
void nv_diffgetput(int put)
void nv_diffgetput(bool put, size_t count)
{
exarg_T ea;
ea.arg = (char_u *)"";
char buf[30];
if (count == 0) {
ea.arg = (char_u *)"";
} else {
vim_snprintf(buf, 30, "%zu", count);
ea.arg = (char_u *)buf;
}
if (put) {
ea.cmdidx = CMD_diffput;
} else {
ea.cmdidx = CMD_diffget;
}
ea.addr_count = 0;
ea.line1 = curwin->w_cursor.lnum;
ea.line2 = curwin->w_cursor.lnum;

View File

@ -7248,7 +7248,8 @@ static void nv_put(cmdarg_T *cap)
/* "dp" is ":diffput" */
if (cap->oap->op_type == OP_DELETE && cap->cmdchar == 'p') {
clearop(cap->oap);
nv_diffgetput(true);
assert(cap->opcount >= 0);
nv_diffgetput(true, (size_t)cap->opcount);
} else
clearopbeep(cap->oap);
} else {
@ -7350,7 +7351,8 @@ static void nv_open(cmdarg_T *cap)
/* "do" is ":diffget" */
if (cap->oap->op_type == OP_DELETE && cap->cmdchar == 'o') {
clearop(cap->oap);
nv_diffgetput(false);
assert(cap->opcount >= 0);
nv_diffgetput(false, (size_t)cap->opcount);
} else if (VIsual_active) /* switch start and end of visual */
v_swap_corners(cap->cmdchar);
else

View File

@ -255,7 +255,7 @@ static int included_patches[] = {
493,
//492,
491,
//490,
490,
489,
488,
487,