mirror of
https://github.com/neovim/neovim.git
synced 2025-09-09 04:48:18 +00:00
vim-patch:7.4.1089
Problem: Repeating CTRL-A doesn't work.
Solution: Call prep_redo_cmd(). (Hirohito Higashi)
ef2b5036b3
This commit is contained in:
@@ -3523,6 +3523,7 @@ static void nv_help(cmdarg_T *cap)
|
|||||||
static void nv_addsub(cmdarg_T *cap)
|
static void nv_addsub(cmdarg_T *cap)
|
||||||
{
|
{
|
||||||
if (!VIsual_active && cap->oap->op_type == OP_NOP) {
|
if (!VIsual_active && cap->oap->op_type == OP_NOP) {
|
||||||
|
prep_redo_cmd(cap);
|
||||||
cap->oap->op_type = cap->cmdchar == Ctrl_A ? OP_NR_ADD : OP_NR_SUB;
|
cap->oap->op_type = cap->cmdchar == Ctrl_A ? OP_NR_ADD : OP_NR_SUB;
|
||||||
op_addsub(cap->oap, cap->count1, cap->arg);
|
op_addsub(cap->oap, cap->count1, cap->arg);
|
||||||
cap->oap->op_type = OP_NOP;
|
cap->oap->op_type = OP_NOP;
|
||||||
|
@@ -701,4 +701,11 @@ func Test_visual_increment_37()
|
|||||||
call assert_equal(["1 26", "4 59"], getline(1, 2))
|
call assert_equal(["1 26", "4 59"], getline(1, 2))
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Check redo after the normal mode increment
|
||||||
|
func Test_visual_increment_38()
|
||||||
|
exec "norm! i10\<ESC>5\<C-A>."
|
||||||
|
call assert_equal(["20"], getline(1, '$'))
|
||||||
|
call assert_equal([0, 1, 2, 0], getpos('.'))
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: tabstop=2 shiftwidth=2 expandtab
|
" vim: tabstop=2 shiftwidth=2 expandtab
|
||||||
|
@@ -73,6 +73,7 @@ static int included_patches[] = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1089,
|
||||||
1088,
|
1088,
|
||||||
1087,
|
1087,
|
||||||
// 1086,
|
// 1086,
|
||||||
|
Reference in New Issue
Block a user