summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_extui/messages.lua
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2025-07-12 01:15:31 +0200
committerGitHub <noreply@github.com>2025-07-12 01:15:31 +0200
commit8c6ea76ebcdf59ee9894412c838ecedde15c1f07 (patch)
treeb0739589d5010c09bdaf7a8cc70f8cd308dcc569 /runtime/lua/vim/_extui/messages.lua
parentd4074b812d0bdd4eb89f4f3dfcb8854cdd9e95a4 (diff)
fix(extui): disable cmdline highlighter when showing a message (#34887)
Problem: When message is moved from message window to cmdline, the cmdline highlighter is not disabled. Solution: Disable the highlighter (and only scroll to bottom when message was moved to pager).
Diffstat (limited to 'runtime/lua/vim/_extui/messages.lua')
-rw-r--r--runtime/lua/vim/_extui/messages.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/lua/vim/_extui/messages.lua b/runtime/lua/vim/_extui/messages.lua
index 2bd6088340..73f749811a 100644
--- a/runtime/lua/vim/_extui/messages.lua
+++ b/runtime/lua/vim/_extui/messages.lua
@@ -199,7 +199,11 @@ local function msg_to_full(src)
hlopts.end_col, hlopts.hl_group = mark[4].end_col, mark[4].hl_group
api.nvim_buf_set_extmark(ext.bufs[tar], ext.ns, srow + mark[2], mark[3], hlopts)
end
- api.nvim_command('norm! G')
+ if tar == 'cmd' and ext.cmd.highlighter then
+ ext.cmd.highlighter.active[ext.bufs.cmd] = nil
+ elseif tar == 'pager' then
+ api.nvim_command('norm! G')
+ end
M.virt.msg[M.virt.idx.spill][1] = nil
else
for _, id in pairs(M.virt.ids) do