mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
fix(messages): no message kind for search pattern #31272
This commit is contained in:
@ -800,6 +800,7 @@ must handle.
|
||||
"rpc_error" Error response from |rpcrequest()|
|
||||
"return_prompt" |press-enter| prompt after a multiple messages
|
||||
"quickfix" Quickfix navigation message
|
||||
"search_cmd" Entered search command
|
||||
"search_count" Search count message ("S" flag of 'shortmess')
|
||||
"wmsg" Warning ("search hit BOTTOM", |W10|, …)
|
||||
New kinds may be added in the future; clients should treat unknown
|
||||
|
@ -1203,6 +1203,7 @@ int do_search(oparg_T *oap, int dirc, int search_delim, char *pat, size_t patlen
|
||||
|
||||
// Compute msg_row early.
|
||||
msg_start();
|
||||
msg_ext_set_kind("search_cmd");
|
||||
|
||||
// Get the offset, so we know how long it is.
|
||||
if (!cmd_silent
|
||||
|
@ -1140,6 +1140,18 @@ stack traceback:
|
||||
exec_lua([[vim.print({ foo = "bar" })]])
|
||||
screen:expect_unchanged()
|
||||
end)
|
||||
|
||||
it('emits single message for normal search)', function()
|
||||
feed('ax<cr>x<esc>?x<cr>')
|
||||
screen:expect({
|
||||
messages = {
|
||||
{
|
||||
content = { { '?x ' } },
|
||||
kind = 'search_cmd',
|
||||
},
|
||||
},
|
||||
})
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('ui/builtin messages', function()
|
||||
|
Reference in New Issue
Block a user