mirror of
https://github.com/neovim/neovim.git
synced 2026-07-16 22:21:30 +00:00
fix(ui): no empty message for substitution match with ext_messages #37600
Problem: Empty message is emitted when a match is found. Solution: Don't emit it with ext_messages enabled.
This commit is contained in:
@@ -4527,7 +4527,7 @@ skip:
|
|||||||
emsg(_(e_interr));
|
emsg(_(e_interr));
|
||||||
} else if (got_match) {
|
} else if (got_match) {
|
||||||
// did find something but nothing substituted
|
// did find something but nothing substituted
|
||||||
if (p_ch > 0) {
|
if (p_ch > 0 && !ui_has(kUIMessages)) {
|
||||||
msg("", 0);
|
msg("", 0);
|
||||||
}
|
}
|
||||||
} else if (subflags.do_error) {
|
} else if (subflags.do_error) {
|
||||||
|
|||||||
@@ -170,6 +170,16 @@ describe('cmdline2', function()
|
|||||||
]])
|
]])
|
||||||
t.eq(n.eval('v:errmsg'), "E1514: 'findfunc' did not return a List type")
|
t.eq(n.eval('v:errmsg'), "E1514: 'findfunc' did not return a List type")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('substitution match does not clear cmdline', function()
|
||||||
|
exec('call setline(1, "foo")')
|
||||||
|
feed(':s/f')
|
||||||
|
screen:expect([[
|
||||||
|
{10:f}oo |
|
||||||
|
{1:~ }|*12
|
||||||
|
{16::}{15:s}{16:/f}^ |
|
||||||
|
]])
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('cmdline2', function()
|
describe('cmdline2', function()
|
||||||
|
|||||||
Reference in New Issue
Block a user