To: vim_dev@googlegroups.com Subject: Patch 8.2.2281 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2281 Problem: Vim9: compiled "wincmd" cannot be followed by bar. Solution: Check for bar after "wincmd". (closes #7599) Files: src/vim9compile.c, src/testdir/test_vim9_cmd.vim *** ../vim-8.2.2280/src/vim9compile.c 2021-01-02 18:17:22.946191468 +0100 --- src/vim9compile.c 2021-01-02 19:39:34.172100390 +0100 *************** *** 7329,7334 **** --- 7329,7348 ---- if (eap->nextcmd != NULL) nextcmd = eap->nextcmd; } + else if (eap->cmdidx == CMD_wincmd) + { + p = eap->arg; + if (*p != NUL) + ++p; + if (*p == 'g' || *p == Ctrl_G) + ++p; + p = skipwhite(p); + if (*p == '|') + { + *p = NUL; + nextcmd = p + 1; + } + } } if (eap->cmdidx == CMD_syntax && STRNCMP(eap->arg, "include ", 8) == 0) *** ../vim-8.2.2280/src/testdir/test_vim9_cmd.vim 2020-12-31 21:28:43.423217932 +0100 --- src/testdir/test_vim9_cmd.vim 2021-01-02 19:39:04.756210421 +0100 *************** *** 868,871 **** --- 868,881 ---- bwipe! enddef + def Test_wincmd() + split + var id1 = win_getid() + if true + try | wincmd w | catch | endtry + endif + assert_notequal(id1, win_getid()) + close + enddef + " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker *** ../vim-8.2.2280/src/version.c 2021-01-02 18:31:10.887220293 +0100 --- src/version.c 2021-01-02 19:34:56.417141242 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2281, /**/ -- From "know your smileys": |-P Reaction to unusually ugly C code /// 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 ///