Patch 8.2.3174
Problem:    Vim9: "legacy undo" finds "undo" variable.
Solution:   Do not pass lookup function to find_ex_command(). (closes #8563)
Files:      src/vim9compile.c, src/testdir/test_vim9_assign.vim


*** ../vim-8.2.3173/src/vim9compile.c   2021-07-15 19:23:14.313392491 +0200
--- src/vim9compile.c   2021-07-17 20:50:39.314487358 +0200
***************
*** 9510,9516 ****
                }
            }
        }
!       p = find_ex_command(&ea, NULL, starts_with_colon
                                                  ? NULL : item_exists, &cctx);
  
        if (p == NULL)
--- 9510,9517 ----
                }
            }
        }
!       p = find_ex_command(&ea, NULL,
!               starts_with_colon || (local_cmdmod.cmod_flags & CMOD_LEGACY)
                                                  ? NULL : item_exists, &cctx);
  
        if (p == NULL)
*** ../vim-8.2.3173/src/testdir/test_vim9_assign.vim    2021-07-15 
19:23:14.313392491 +0200
--- src/testdir/test_vim9_assign.vim    2021-07-17 20:50:02.046554154 +0200
***************
*** 1632,1637 ****
--- 1632,1644 ----
      let s:legvar = 'one'
    END
    CheckScriptFailure(lines, 'E476:', 1)
+ 
+   edit! Xfile
+   lines =<< trim END
+       var edit: bool
+       legacy edit
+   END
+   CheckDefAndScriptSuccess(lines)
  enddef
  
  def Test_var_type_check()
*** ../vim-8.2.3173/src/version.c       2021-07-17 19:11:03.580709066 +0200
--- src/version.c       2021-07-17 20:46:23.418946508 +0200
***************
*** 757,758 ****
--- 757,760 ----
  {   /* Add new patch number below this line */
+ /**/
+     3174,
  /**/

-- 
Living in Hollywood is like living in a bowl of granola.  What ain't
fruits and nuts is flakes.

 /// 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/202107171925.16HJPf9V2550558%40masaka.moolenaar.net.

Raspunde prin e-mail lui