Patch 8.2.1578
Problem:    Vim9: popup_clear() does not take "true" as argument.
Solution:   Use tv_get_bool(). (closes #6826)
Files:      src/popupwin.c, src/testdir/test_popupwin.vim


*** ../vim-8.2.1577/src/popupwin.c      2020-08-18 22:50:34.769829447 +0200
--- src/popupwin.c      2020-09-02 22:31:39.928767229 +0200
***************
*** 2125,2131 ****
      int force = FALSE;
  
      if (argvars[0].v_type != VAR_UNKNOWN)
!       force = (int)tv_get_number(&argvars[0]);
      close_all_popups(force);
  }
  
--- 2125,2131 ----
      int force = FALSE;
  
      if (argvars[0].v_type != VAR_UNKNOWN)
!       force = (int)tv_get_bool(&argvars[0]);
      close_all_popups(force);
  }
  
*** ../vim-8.2.1577/src/testdir/test_popupwin.vim       2020-08-20 
18:59:02.106779176 +0200
--- src/testdir/test_popupwin.vim       2020-09-02 22:31:05.652848086 +0200
***************
*** 2559,2578 ****
  
  func Test_popupwin_close_prevwin()
    CheckFeature terminal
  
!   call assert_equal(1, winnr('$'))
    split
    wincmd b
!   call assert_equal(2, winnr())
    let buf = term_start(&shell, #{hidden: 1})
!   call popup_create(buf, {})
!   call TermWait(buf, 100)
!   call popup_clear(1)
!   call assert_equal(2, winnr())
  
    quit
    exe 'bwipe! ' .. buf
! endfunc
  
  func Test_popupwin_with_buffer_and_filter()
    new Xwithfilter
--- 2559,2581 ----
  
  func Test_popupwin_close_prevwin()
    CheckFeature terminal
+   call Popupwin_close_prevwin()
+ endfunc
  
! def Popupwin_close_prevwin()
!   assert_equal(1, winnr('$'))
    split
    wincmd b
!   assert_equal(2, winnr())
    let buf = term_start(&shell, #{hidden: 1})
!   popup_create(buf, {})
!   TermWait(buf, 100)
!   popup_clear(true)
!   assert_equal(2, winnr())
  
    quit
    exe 'bwipe! ' .. buf
! enddef
  
  func Test_popupwin_with_buffer_and_filter()
    new Xwithfilter
*** ../vim-8.2.1577/src/version.c       2020-09-02 22:25:31.721607983 +0200
--- src/version.c       2020-09-02 22:28:35.701190511 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1578,
  /**/

-- 
MORTICIAN:    What?
CUSTOMER:     Nothing -- here's your nine pence.
DEAD PERSON:  I'm not dead!
MORTICIAN:    Here -- he says he's not dead!
CUSTOMER:     Yes, he is.
DEAD PERSON:  I'm not!
                                  The Quest for the Holy Grail (Monty Python)

 /// 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/202009022033.082KXvQH3696905%40masaka.moolenaar.net.

Raspunde prin e-mail lui