From 1cf933e7befffb4077ef14f2f87a9ed9eecdd625 Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Tue, 23 Dec 2014 13:06:39 +0100 Subject: vim-patch:7.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) https://code.google.com/p/vim/source/detail?r=v7-4-490 --- src/nvim/normal.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/nvim/normal.c') diff --git a/src/nvim/normal.c b/src/nvim/normal.c index e1dc2b93d9..5a6cc92a33 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -11,6 +11,7 @@ * the operators. */ +#include #include #include #include @@ -7246,7 +7247,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 { @@ -7348,7 +7350,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 -- cgit