Patch 8.2.2022
Problem:    Vim9: star command recognized errornously.
Solution:   Give an error for missing colon. (issue #7335)
Files:      src/ex_docmd.c, src/testdir/test_vim9_cmd.vim


*** ../vim-8.2.2021/src/ex_docmd.c      2020-11-20 19:26:45.081207924 +0100
--- src/ex_docmd.c      2020-11-20 21:05:45.671331142 +0100
***************
*** 3482,3487 ****
--- 3482,3492 ----
                break;
            }
  
+       // Not not recognize ":*" as the star command unless '*' is in
+       // 'cpoptions'.
+       if (eap->cmdidx == CMD_star && vim_strchr(p_cpo, CPO_STAR) == NULL)
+           p = eap->cmd;
+ 
        // Look for a user defined command as a last resort.  Let ":Print" be
        // overruled by a user defined command.
        if ((eap->cmdidx == CMD_SIZE || eap->cmdidx == CMD_Print)
*** ../vim-8.2.2021/src/testdir/test_vim9_cmd.vim       2020-11-12 
12:08:47.986254110 +0100
--- src/testdir/test_vim9_cmd.vim       2020-11-20 21:05:08.951441860 +0100
***************
*** 634,638 ****
--- 634,652 ----
    CheckScriptSuccess(lines)
  enddef
  
+ def Test_star_command()
+   var lines =<< trim END
+     vim9script
+     @s = 'g:success = 8'
+     set cpo+=*
+     exe '*s'
+     assert_equal(8, g:success)
+     unlet g:success
+     set cpo-=*
+     assert_fails("exe '*s'", 'E1050:')
+   END
+   CheckScriptSuccess(lines)
+ enddef
+ 
  
  " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
*** ../vim-8.2.2021/src/version.c       2020-11-20 19:26:45.081207924 +0100
--- src/version.c       2020-11-20 21:01:56.652020779 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2022,
  /**/

-- 
Facepalm statement #2: "If there is a country without immigrants I'm going to
move there"

 /// 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/202011202007.0AKK7VWg725486%40masaka.moolenaar.net.

Raspunde prin e-mail lui