fix(extui): map wincmd instead of remapped key (#34151)

Problem: "q" cannot close window when `<c-w>` is mapped.
Solution: Map q to `<Cmd>wincmd c<CR>`.
This commit is contained in:
phanium
2025-05-24 18:02:11 +08:00
committed by GitHub
parent c9d8468020
commit a59b052857

View File

@@ -47,7 +47,7 @@ function M.tab_check_wins()
M.cmd.highlighter = vim.treesitter.highlighter.new(parser)
elseif type == 'more' then
-- Close more window with `q`, same as `checkhealth`
api.nvim_buf_set_keymap(M.bufs.more, 'n', 'q', '<C-w>c', {})
api.nvim_buf_set_keymap(M.bufs.more, 'n', 'q', '<Cmd>wincmd c<CR>', {})
end
end