mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
fix(messages): clear 'showmode' message after insert_expand #33607
Problem: 'showmode' ext_messages state is not cleared after insert_expand mode. Solution: Replace empty message with more idiomatic way to clear the showmode.
This commit is contained in:
@@ -3458,7 +3458,7 @@ static bool ins_esc(int *count, int cmdchar, bool nomove)
|
|||||||
showmode();
|
showmode();
|
||||||
} else if (p_smd && (got_int || !skip_showmode())
|
} else if (p_smd && (got_int || !skip_showmode())
|
||||||
&& !(p_ch == 0 && !ui_has(kUIMessages))) {
|
&& !(p_ch == 0 && !ui_has(kUIMessages))) {
|
||||||
msg("", 0);
|
unshowmode(false);
|
||||||
}
|
}
|
||||||
// Exit Insert mode
|
// Exit Insert mode
|
||||||
return true;
|
return true;
|
||||||
|
@@ -82,7 +82,7 @@ local hl_grid_legacy_c = [[
|
|||||||
{15:return} {26:0}; |
|
{15:return} {26:0}; |
|
||||||
} |
|
} |
|
||||||
{1:~ }|*2
|
{1:~ }|*2
|
||||||
|
|
14 more lines |
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local hl_grid_ts_c = [[
|
local hl_grid_ts_c = [[
|
||||||
@@ -102,7 +102,7 @@ local hl_grid_ts_c = [[
|
|||||||
{15:return} {26:0}; |
|
{15:return} {26:0}; |
|
||||||
} |
|
} |
|
||||||
{1:~ }|*2
|
{1:~ }|*2
|
||||||
|
|
{MATCH:1?4? m?o?r?e? l?i?n?e?s?.*}|
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local test_text_c = [[
|
local test_text_c = [[
|
||||||
|
@@ -1663,6 +1663,22 @@ stack traceback:
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('clears showmode after insert_expand mode', function()
|
||||||
|
feed('i<C-N>')
|
||||||
|
screen:expect({
|
||||||
|
grid = [[
|
||||||
|
^ |
|
||||||
|
{1:~ }|*4
|
||||||
|
]],
|
||||||
|
showmode = { { '-- Keyword completion (^N^P) ', 5, 11 }, { 'Pattern not found', 9, 6 } },
|
||||||
|
})
|
||||||
|
feed('<Esc>')
|
||||||
|
screen:expect([[
|
||||||
|
^ |
|
||||||
|
{1:~ }|*4
|
||||||
|
]])
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('ui/builtin messages', function()
|
describe('ui/builtin messages', function()
|
||||||
|
Reference in New Issue
Block a user