Patch 8.2.4552
Problem:    In a :def function "put = expr" does not work.
Solution:   Skip over white space. (closes #9936)
Files:      src/vim9cmds.c, src/testdir/test_vim9_cmd.vim


*** ../vim-8.2.4551/src/vim9cmds.c      2022-03-10 21:53:40.825910569 +0000
--- src/vim9cmds.c      2022-03-12 14:49:52.586126494 +0000
***************
*** 1767,1773 ****
  
      if (eap->regname == '=')
      {
!       char_u *p = line + 1;
  
        if (compile_expr0(&p, cctx) == FAIL)
            return NULL;
--- 1767,1773 ----
  
      if (eap->regname == '=')
      {
!       char_u *p = skipwhite(line + 1);
  
        if (compile_expr0(&p, cctx) == FAIL)
            return NULL;
*** ../vim-8.2.4551/src/testdir/test_vim9_cmd.vim       2022-03-04 
23:22:22.217834504 +0000
--- src/testdir/test_vim9_cmd.vim       2022-03-12 14:48:26.394486368 +0000
***************
*** 1217,1223 ****
    :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))
--- 1217,1223 ----
    :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))
*** ../vim-8.2.4551/src/version.c       2022-03-12 13:48:35.502586206 +0000
--- src/version.c       2022-03-12 14:49:37.790187783 +0000
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     4552,
  /**/

-- 
A man is incomplete until he's married ... and then he's finished!

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220312145221.7735D1C79E5%40moolenaar.net.

Raspunde prin e-mail lui