From 2016365ffe3f791193ca5d58812ed56bdfc307e5 Mon Sep 17 00:00:00 2001 From: watiko Date: Fri, 15 Jan 2016 21:59:35 +0900 Subject: vim-patch:7.4.1089 Problem: Repeating CTRL-A doesn't work. Solution: Call prep_redo_cmd(). (Hirohito Higashi) https://github.com/vim/vim/commit/ef2b5036b3005f1ce15d146dce72379a9834c56d --- src/nvim/normal.c | 1 + src/nvim/testdir/test_increment.vim | 7 +++++++ src/nvim/version.c | 1 + 3 files changed, 9 insertions(+) diff --git a/src/nvim/normal.c b/src/nvim/normal.c index af3f747195..cb3fc98dfa 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -3523,6 +3523,7 @@ static void nv_help(cmdarg_T *cap) static void nv_addsub(cmdarg_T *cap) { 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; op_addsub(cap->oap, cap->count1, cap->arg); cap->oap->op_type = OP_NOP; diff --git a/src/nvim/testdir/test_increment.vim b/src/nvim/testdir/test_increment.vim index e4f67eacad..9b592edce4 100644 --- a/src/nvim/testdir/test_increment.vim +++ b/src/nvim/testdir/test_increment.vim @@ -701,4 +701,11 @@ func Test_visual_increment_37() call assert_equal(["1 26", "4 59"], getline(1, 2)) endfunc +" Check redo after the normal mode increment +func Test_visual_increment_38() + exec "norm! i10\5\." + call assert_equal(["20"], getline(1, '$')) + call assert_equal([0, 1, 2, 0], getpos('.')) +endfunc + " vim: tabstop=2 shiftwidth=2 expandtab diff --git a/src/nvim/version.c b/src/nvim/version.c index d64fb69415..c3555a9731 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -73,6 +73,7 @@ static int included_patches[] = { + 1089, 1088, 1087, // 1086, -- cgit