Patch 8.2.1853
Problem:    "to_f" is recognized at "topleft" modifier.
Solution:   Do not recognize modifer when "_" follows. (closes #7019)
Files:      src/ex_docmd.c, src/testdir/test_vim9_assign.vim


*** ../vim-8.2.1852/src/ex_docmd.c      2020-10-13 19:08:20.267560498 +0200
--- src/ex_docmd.c      2020-10-16 19:55:26.510089046 +0200
***************
*** 3123,3129 ****
      for (i = 0; cmd[i] != NUL; ++i)
        if (((char_u *)cmd)[i] != (*pp)[i])
            break;
!     if (i >= len && !isalpha((*pp)[i]))
      {
        *pp = skipwhite(*pp + i);
        return TRUE;
--- 3123,3129 ----
      for (i = 0; cmd[i] != NUL; ++i)
        if (((char_u *)cmd)[i] != (*pp)[i])
            break;
!     if (i >= len && !isalpha((*pp)[i]) && (*pp)[i] != '_')
      {
        *pp = skipwhite(*pp + i);
        return TRUE;
*** ../vim-8.2.1852/src/testdir/test_vim9_assign.vim    2020-10-12 
20:31:11.291727542 +0200
--- src/testdir/test_vim9_assign.vim    2020-10-16 19:54:13.190245172 +0200
***************
*** 454,460 ****
  enddef
  
  def Test_assignment_default()
- 
    # Test default values.
    var thebool: bool
    assert_equal(v:false, thebool)
--- 454,459 ----
***************
*** 571,576 ****
--- 570,579 ----
      assert_equal(43, w)
      var t: number = 44
      assert_equal(44, t)
+ 
+     var to_var = 0
+     to_var = 3
+     assert_equal(3, to_var)
    END
    CheckScriptSuccess(lines)
  
*** ../vim-8.2.1852/src/version.c       2020-10-15 22:29:13.566726912 +0200
--- src/version.c       2020-10-16 19:31:58.689690842 +0200
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     1853,
  /**/

-- 
>From "know your smileys":
 *<|:-) Santa Claus (Ho Ho Ho)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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/202010161756.09GHur99429962%40masaka.moolenaar.net.

Raspunde prin e-mail lui