From 39a03c0fe736629cf7804dbaf9b73df60aa237cd Mon Sep 17 00:00:00 2001 From: Alexander Karle Date: Fri, 1 Jun 2018 18:22:53 -0400 Subject: [PATCH] wildmenu: close before redrawing statusline (#8453) Fixes #8385 --- src/nvim/ex_getln.c | 1 + test/functional/ui/wildmode_spec.lua | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 96388a2a9d..f62b0a2060 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -641,6 +641,7 @@ static int command_line_execute(VimState *state, int key) save_p_ls = -1; } else { win_redraw_last_status(topframe); + wild_menu_showing = 0; // must be before redraw_statuslines #8385 redraw_statuslines(); } KeyTyped = skt; diff --git a/test/functional/ui/wildmode_spec.lua b/test/functional/ui/wildmode_spec.lua index c6ddc78618..b60d520ca0 100644 --- a/test/functional/ui/wildmode_spec.lua +++ b/test/functional/ui/wildmode_spec.lua @@ -31,6 +31,29 @@ describe("'wildmenu'", function() ]]) end) + it(':sign hides wildmenu #8453', function() + command('set wildmode=full') + -- only a regression if status-line open + command('set laststatus=2') + command('set wildmenu') + feed(':sign ') + screen:expect([[ + | + ~ | + ~ | + define jump list > | + :sign define^ | + ]]) + feed('') + screen:expect([[ + | + ~ | + ~ | + [No Name] | + :sign define ^ | + ]]) + end) + it('does not crash after cycling back to original text', function() command('set wildmode=full') feed(':j')