Skip to content

Commit

Permalink
patch 9.0.0236: popup menu not removed when 'wildmenu' reset while vi…
Browse files Browse the repository at this point in the history
…sible

Problem:    Popup menu not removed when 'wildmenu' reset while it is visible.
Solution:   Do not check p_wmnu, only pum_visible(). (closes #10953)
  • Loading branch information
zeertzjq authored and brammool committed Aug 21, 2022
1 parent 474ad39 commit b82a2ab
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmdexpand.c
Expand Up @@ -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;
}

/*
Expand Down
10 changes: 10 additions & 0 deletions src/testdir/test_cmdline.vim
Expand Up @@ -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
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -731,6 +731,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
236,
/**/
235,
/**/
Expand Down

0 comments on commit b82a2ab

Please sign in to comment.