mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #11115 from bfredl/wildmenumode
cmdline: wildmenumode() should be true with wildoptions+=pum
This commit is contained in:
commit
ce637d0ef1
@ -18845,8 +18845,9 @@ static void f_visualmode(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
|||||||
*/
|
*/
|
||||||
static void f_wildmenumode(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
static void f_wildmenumode(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||||
{
|
{
|
||||||
if (wild_menu_showing)
|
if (wild_menu_showing || ((State & CMDLINE) && pum_visible())) {
|
||||||
rettv->vval.v_number = 1;
|
rettv->vval.v_number = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// "win_findbuf()" function
|
/// "win_findbuf()" function
|
||||||
|
@ -516,6 +516,7 @@ describe('ui/ext_popupmenu', function()
|
|||||||
{1:~ }|
|
{1:~ }|
|
||||||
:sign ^ |
|
:sign ^ |
|
||||||
]])
|
]])
|
||||||
|
eq(0, funcs.wildmenumode())
|
||||||
|
|
||||||
feed('<tab>')
|
feed('<tab>')
|
||||||
screen:expect{grid=[[
|
screen:expect{grid=[[
|
||||||
@ -530,6 +531,7 @@ describe('ui/ext_popupmenu', function()
|
|||||||
{1:~ }|
|
{1:~ }|
|
||||||
:sign define^ |
|
:sign define^ |
|
||||||
]], popupmenu={items=wild_expected, pos=0, anchor={1, 9, 6}}}
|
]], popupmenu={items=wild_expected, pos=0, anchor={1, 9, 6}}}
|
||||||
|
eq(1, funcs.wildmenumode())
|
||||||
|
|
||||||
feed('<left>')
|
feed('<left>')
|
||||||
screen:expect{grid=[[
|
screen:expect{grid=[[
|
||||||
@ -589,6 +591,7 @@ describe('ui/ext_popupmenu', function()
|
|||||||
:sign unplace^ |
|
:sign unplace^ |
|
||||||
]], popupmenu={items=wild_expected, pos=5, anchor={1, 9, 6}}}
|
]], popupmenu={items=wild_expected, pos=5, anchor={1, 9, 6}}}
|
||||||
feed('<esc>')
|
feed('<esc>')
|
||||||
|
eq(0, funcs.wildmenumode())
|
||||||
|
|
||||||
-- check positioning with multibyte char in pattern
|
-- check positioning with multibyte char in pattern
|
||||||
command("e långfile1")
|
command("e långfile1")
|
||||||
|
Loading…
Reference in New Issue
Block a user