mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
UI: redraw statusline when entering cmdline (#8347)
This commit is contained in:
@@ -347,6 +347,13 @@ static uint8_t *command_line_enter(int firstc, long count, int indent)
|
|||||||
redrawcmd();
|
redrawcmd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// redraw the statusline for statuslines that display the current mode
|
||||||
|
// using the mode() function.
|
||||||
|
if (KeyTyped) {
|
||||||
|
curwin->w_redr_status = true;
|
||||||
|
redraw_statuslines();
|
||||||
|
}
|
||||||
|
|
||||||
did_emsg = false;
|
did_emsg = false;
|
||||||
got_int = false;
|
got_int = false;
|
||||||
s->state.check = command_line_check;
|
s->state.check = command_line_check;
|
||||||
|
@@ -157,6 +157,27 @@ describe('external cmdline', function()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it("redraws statusline on entering", function()
|
||||||
|
command('set laststatus=2')
|
||||||
|
command('set statusline=%{mode()}')
|
||||||
|
feed(':')
|
||||||
|
screen:expect([[
|
||||||
|
|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{3:c^ }|
|
||||||
|
|
|
||||||
|
]], nil, nil, function()
|
||||||
|
eq({{
|
||||||
|
content = { { {}, "" } },
|
||||||
|
firstc = ":",
|
||||||
|
indent = 0,
|
||||||
|
pos = 0,
|
||||||
|
prompt = ""
|
||||||
|
}}, cmdline)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
it("works with input()", function()
|
it("works with input()", function()
|
||||||
feed(':call input("input", "default")<cr>')
|
feed(':call input("input", "default")<cr>')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
Reference in New Issue
Block a user