patch 8.2.4552: in a :def function "put = expr" does not work
Problem: In a :def function "put = expr" does not work.
Solution: Skip over white space. (closes #9936)
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index 92b834c..47b6f77 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -1217,7 +1217,7 @@
:2put =['a', 'b', 'c']
assert_equal(['ppp', 'a', 'b', 'c', 'above'], getline(2, 6))
- :0put ='first'
+ :0put = 'first'
assert_equal('first', getline(1))
:1put! ='first again'
assert_equal('first again', getline(1))
diff --git a/src/version.c b/src/version.c
index 13f5da3..acc5ccf 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4552,
+/**/
4551,
/**/
4550,
diff --git a/src/vim9cmds.c b/src/vim9cmds.c
index 5a44644..b8a511f 100644
--- a/src/vim9cmds.c
+++ b/src/vim9cmds.c
@@ -1767,7 +1767,7 @@
if (eap->regname == '=')
{
- char_u *p = line + 1;
+ char_u *p = skipwhite(line + 1);
if (compile_expr0(&p, cctx) == FAIL)
return NULL;