diff --git a/src/getchar.c b/src/getchar.c index ddb23dd5c1..ff03905b44 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -844,6 +844,14 @@ start_redo(long count, int old_redo) if (c >= '1' && c < '9') ++c; add_char_buff(&readbuf2, c); + + /* the expression register should be re-evaluated */ + if (c == '=') + { + add_char_buff(&readbuf2, CAR); + cmd_silent = TRUE; + } + c = read_redo(FALSE, old_redo); } diff --git a/src/testdir/test_put.vim b/src/testdir/test_put.vim index 18c7f4e64d..0a23a43919 100644 --- a/src/testdir/test_put.vim +++ b/src/testdir/test_put.vim @@ -45,3 +45,16 @@ func Test_put_lines() bw! call setreg('a', a[0], a[1]) endfunc + +func Test_put_expr() + new + call setline(1, repeat(['A'], 6)) + exec "1norm! \"=line('.')\p" + norm! j0. + norm! j0. + exec "4norm! \"=\P" + norm! j0. + norm! j0. + call assert_equal(['A1','A2','A3','4A','5A','6A'], getline(1,'$')) + bw! +endfunc diff --git a/src/version.c b/src/version.c index 3208eca446..0cfe61a04a 100644 --- a/src/version.c +++ b/src/version.c @@ -761,6 +761,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 22, /**/ 21, /**/