To: vim_dev@googlegroups.com Subject: Patch 8.2.2022 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- 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 ///