ex_getln: fix statusline redraw logic #9967

fixes #9908
This commit is contained in:
Carlo Abelli
2019-05-02 09:38:21 +00:00
committed by Justin M. Keyes
parent 53cef34f16
commit 49c51f839b
2 changed files with 26 additions and 1 deletions

View File

@@ -366,7 +366,7 @@ static uint8_t *command_line_enter(int firstc, long count, int indent)
// redraw the statusline for statuslines that display the current mode
// using the mode() function.
if (KeyTyped && msg_scrolled == 0) {
if (!cmd_silent && msg_scrolled == 0) {
curwin->w_redr_status = true;
redraw_statuslines();
}

View File

@@ -116,6 +116,31 @@ local function test_cmdline(linegrid)
}}}
end)
it('from normal mode when : is mapped', function()
command('nnoremap ; :')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{3:n }|
|
]]}
feed(';')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{3:c }|
|
]], cmdline={{
firstc = ":",
content = {{""}},
pos = 0,
}}}
end)
it('but not with scrolled messages', function()
screen:try_resize(35,10)
feed(':echoerr doesnotexist<cr>')