Problem: :put does not work properly in compiled function. (John Beckett)
Solution: Adjust the direction when using line zero.
:2put =['a', 'b', 'c']
assert_equal(['ppp', 'a', 'b', 'c', 'above'], getline(2, 6))
+ :0put ='first'
+ assert_equal('first', getline(1))
+ :1put! ='first again'
+ assert_equal('first again', getline(1))
+
# compute range at runtime
+ :%del
setline(1, range(1, 8))
@a = 'aaa'
:$-2put a
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4319,
/**/
4318,
/**/
// :put! above cursor
dir = BACKWARD;
else if (lnum >= 0)
- curwin->w_cursor.lnum = iptr->isn_arg.put.put_lnum;
+ {
+ curwin->w_cursor.lnum = lnum;
+ if (lnum == 0)
+ // check_cursor() below will move to line 1
+ dir = BACKWARD;
+ }
if (regname == '=')
{