mirror of
https://github.com/neovim/neovim.git
synced 2026-07-24 01:40:41 +00:00
fix(ui2): clear showcmd virt_text together with search count
Problem: when the search count is displayed, the showcmd virt_text is set to 11 empty spaces to ensure a consistent distance between search count and ruler, or screen edge in case of noruler. But when the search count is removed to make place for a message, the empty dummy showcmd remains and unnecessarily erases part of the message. Solution: properly remove showcmd together with search count.
This commit is contained in:
@@ -462,6 +462,7 @@ function M.msg_show(kind, content, replace_last, _, append, id, trigger)
|
||||
M.cmd.last_emsg = (kind == 'emsg' or kind == 'wmsg') and os.time() or M.cmd.last_emsg
|
||||
-- Should clear the search count now, mark itself is cleared by invalidate.
|
||||
M.virt.last[M.virt.idx.search][1] = nil
|
||||
M.virt.last[M.virt.idx.cmd] = {}
|
||||
end
|
||||
-- When message was emitted below an already expanded cmdline, move and route to pager.
|
||||
tgt = ui.cmd.expand > 0 and 'pager' or tgt
|
||||
|
||||
Reference in New Issue
Block a user