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 -- [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/202101021845.102IjVIG1922894%40masaka.moolenaar.net.

Raspunde prin e-mail lui