]> granicus.if.org Git - vim/commitdiff
patch 9.0.0236: popup menu not removed when 'wildmenu' reset while visible v9.0.0236
authorzeertzjq <zeertzjq@outlook.com>
Sun, 21 Aug 2022 13:33:57 +0000 (14:33 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 21 Aug 2022 13:33:57 +0000 (14:33 +0100)
Problem:    Popup menu not removed when 'wildmenu' reset while it is visible.
Solution:   Do not check p_wmnu, only pum_visible(). (closes #10953)

src/cmdexpand.c
src/testdir/test_cmdline.vim
src/version.c

index fb329a57d7f22318e90cfc8e51d5b62ddfab7103..cdf83955c144533a5201c5eb800e4ef11bae5570 100644 (file)
@@ -367,7 +367,7 @@ void cmdline_pum_display(void)
  */
 int cmdline_pum_active(void)
 {
-    return p_wmnu && pum_visible() && compl_match_array != NULL;
+    return pum_visible() && compl_match_array != NULL;
 }
 
 /*
index 521312a8b1febd37608529e6e54bfa69adaf7485..be688e39696d426db61aa5cba6be669f80bc332b 100644 (file)
@@ -3234,4 +3234,14 @@ func Test_cmdline_redraw_tabline()
   call delete('Xcmdline_redraw_tabline')
 endfunc
 
+func Test_wildmenu_pum_disable_while_shown()
+  set wildoptions=pum
+  set wildmenu
+  cnoremap <F2> <Cmd>set nowildmenu<CR>
+  call feedkeys(":sign \<Tab>\<F2>\<Esc>", 'tx')
+  call assert_equal(0, pumvisible())
+  cunmap <F2>
+  set wildoptions& wildmenu&
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab
index 616f748c40c2a96531f354e7e9417dafb927a837..c12d3c90605c054255f6a3b614926107ecfbeed5 100644 (file)
@@ -731,6 +731,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    236,
 /**/
     235,
 /**/