From a59b052857ca43997b9e8be0a1d5c870ce172807 Mon Sep 17 00:00:00 2001 From: phanium <91544758+phanen@users.noreply.github.com> Date: Sat, 24 May 2025 18:02:11 +0800 Subject: [PATCH] fix(extui): map wincmd instead of remapped key (#34151) Problem: "q" cannot close window when `` is mapped. Solution: Map q to `wincmd c`. --- runtime/lua/vim/_extui/shared.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/lua/vim/_extui/shared.lua b/runtime/lua/vim/_extui/shared.lua index 76eb744135..b50c9baf5f 100644 --- a/runtime/lua/vim/_extui/shared.lua +++ b/runtime/lua/vim/_extui/shared.lua @@ -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', {}) + api.nvim_buf_set_keymap(M.bufs.more, 'n', 'q', 'wincmd c', {}) end end