Patch 8.2.0127
Problem:    Some buffer commands work in a popup window.
Solution:   Disallow :bnext, :bprev, etc. (Naruhiko Nishino, closes #5494)
Files:      src/ex_docmd.c, src/testdir/test_popupwin.vim


*** ../vim-8.2.0126/src/ex_docmd.c      2020-01-17 19:32:14.743572013 +0100
--- src/ex_docmd.c      2020-01-18 14:54:58.572044906 +0100
***************
*** 4613,4618 ****
--- 4613,4621 ----
      static void
  ex_bnext(exarg_T *eap)
  {
+     if (ERROR_IF_POPUP_WINDOW)
+       return;
+ 
      goto_buffer(eap, DOBUF_CURRENT, FORWARD, (int)eap->line2);
      if (eap->do_ecmd_cmd != NULL)
        do_cmdline_cmd(eap->do_ecmd_cmd);
***************
*** 4627,4632 ****
--- 4630,4638 ----
      static void
  ex_bprevious(exarg_T *eap)
  {
+     if (ERROR_IF_POPUP_WINDOW)
+       return;
+ 
      goto_buffer(eap, DOBUF_CURRENT, BACKWARD, (int)eap->line2);
      if (eap->do_ecmd_cmd != NULL)
        do_cmdline_cmd(eap->do_ecmd_cmd);
***************
*** 4641,4646 ****
--- 4647,4655 ----
      static void
  ex_brewind(exarg_T *eap)
  {
+     if (ERROR_IF_POPUP_WINDOW)
+       return;
+ 
      goto_buffer(eap, DOBUF_FIRST, FORWARD, 0);
      if (eap->do_ecmd_cmd != NULL)
        do_cmdline_cmd(eap->do_ecmd_cmd);
***************
*** 4653,4658 ****
--- 4662,4670 ----
      static void
  ex_blast(exarg_T *eap)
  {
+     if (ERROR_IF_POPUP_WINDOW)
+       return;
+ 
      goto_buffer(eap, DOBUF_LAST, BACKWARD, 0);
      if (eap->do_ecmd_cmd != NULL)
        do_cmdline_cmd(eap->do_ecmd_cmd);
*** ../vim-8.2.0126/src/testdir/test_popupwin.vim       2020-01-14 
20:42:31.724887459 +0100
--- src/testdir/test_popupwin.vim       2020-01-18 14:54:58.572044906 +0100
***************
*** 913,918 ****
--- 913,922 ----
    call assert_fails('call win_execute(winid, "next")', 'E994:')
    call assert_fails('call win_execute(winid, "rewind")', 'E994:')
    call assert_fails('call win_execute(winid, "buf")', 'E994:')
+   call assert_fails('call win_execute(winid, "bnext")', 'E994:')
+   call assert_fails('call win_execute(winid, "bprev")', 'E994:')
+   call assert_fails('call win_execute(winid, "bfirst")', 'E994:')
+   call assert_fails('call win_execute(winid, "blast")', 'E994:')
    call assert_fails('call win_execute(winid, "edit")', 'E994:')
    call assert_fails('call win_execute(winid, "enew")', 'E994:')
    call assert_fails('call win_execute(winid, "wincmd x")', 'E994:')
*** ../vim-8.2.0126/src/version.c       2020-01-17 21:00:55.488151211 +0100
--- src/version.c       2020-01-18 14:56:46.359609608 +0100
***************
*** 744,745 ****
--- 744,747 ----
  {   /* Add new patch number below this line */
+ /**/
+     127,
  /**/

-- 
If you don't get everything you want, think of
everything you didn't get and don't want.

 /// 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/202001181407.00IE759p005551%40masaka.moolenaar.net.

Raspunde prin e-mail lui