neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit b2a5105c66e102107a6c10ab06019c8aa1474a99
parent d0867574bd14a6c02b2d0eb92d34e341978a7292
Author: luukvbaal <luukvbaal@gmail.com>
Date:   Sat,  3 May 2025 21:30:08 +0200

fix(extui): search highlighting in extui "more" pager #33792

Problem:  No search highlighting in extui "more" pager window.
Solution: Only use custom highlight namespace in cmdline window.
Diffstat:
Mruntime/lua/vim/_extui.lua | 3+++
Mruntime/lua/vim/_extui/shared.lua | 4+++-
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/runtime/lua/vim/_extui.lua b/runtime/lua/vim/_extui.lua @@ -67,6 +67,9 @@ function M.enable(opts) end end) + -- Use MsgArea and hide search highlighting in the cmdline window. + -- TODO: Add new highlight group/namespaces for other windows? It is + -- clear MsgArea would be wanted in the box, more and prompt windows. api.nvim_set_hl(ext.ns, 'Normal', { link = 'MsgArea' }) api.nvim_set_hl(ext.ns, 'Search', { link = 'MsgArea' }) api.nvim_set_hl(ext.ns, 'CurSearch', { link = 'MsgArea' }) diff --git a/runtime/lua/vim/_extui/shared.lua b/runtime/lua/vim/_extui/shared.lua @@ -67,7 +67,9 @@ function M.tab_check_wins() _cmdline_offset = type == 'cmd' and 0 or nil, }) M.wins[M.tab][type] = api.nvim_open_win(M.bufs[type], false, cfg) - api.nvim_win_set_hl_ns(M.wins[M.tab][type], M.ns) + if type == 'cmd' then + api.nvim_win_set_hl_ns(M.wins[M.tab][type], M.ns) + end setopt = true elseif api.nvim_win_get_buf(M.wins[M.tab][type]) ~= M.bufs[type] then api.nvim_win_set_buf(M.wins[M.tab][type], M.bufs[type])