diff options
| author | Sébastien Hoffmann <contact@shoffmann.dev> | 2026-07-05 11:06:46 +0200 |
|---|---|---|
| committer | Sébastien Hoffmann <contact@shoffmann.dev> | 2026-07-11 18:31:54 +0200 |
| commit | fcc391d89a2a30b02c3ba25a6351d37cdcd79e12 (patch) | |
| tree | cbcf07d4b2d44ac178bfd5e0e0498328bd7b16b4 /runtime/lua/vim | |
| parent | 5b455a8aa03e2091ebfb2b9d762c930f3e00f17c (diff) | |
| download | rneovim-fcc391d89a2a30b02c3ba25a6351d37cdcd79e12.tar.gz rneovim-fcc391d89a2a30b02c3ba25a6351d37cdcd79e12.tar.bz2 rneovim-fcc391d89a2a30b02c3ba25a6351d37cdcd79e12.zip | |
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.
Diffstat (limited to 'runtime/lua/vim')
| -rw-r--r-- | runtime/lua/vim/_core/ui2/messages.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/_core/ui2/messages.lua b/runtime/lua/vim/_core/ui2/messages.lua index 07dc9c205a..1961084c38 100644 --- a/runtime/lua/vim/_core/ui2/messages.lua +++ b/runtime/lua/vim/_core/ui2/messages.lua @@ -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 |