Problem: Repeating put from expression register fails.
Solution: Re-evaluate the expression register. (Andy Massimino,
closes #2945)
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);
}
bw!
call setreg('a', a[0], a[1])
endfunc
+
+func Test_put_expr()
+ new
+ call setline(1, repeat(['A'], 6))
+ exec "1norm! \"=line('.')\<cr>p"
+ norm! j0.
+ norm! j0.
+ exec "4norm! \"=\<cr>P"
+ norm! j0.
+ norm! j0.
+ call assert_equal(['A1','A2','A3','4A','5A','6A'], getline(1,'$'))
+ bw!
+endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 22,
/**/
21,
/**/