mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
fix(checkhealth): don't override user "q" keymap #33132
(cherry picked from commit 78d2e0b43e
)
This commit is contained in:
committed by
github-actions[bot]
parent
056dbf3ea7
commit
adfd4b9f4f
@ -449,11 +449,15 @@ function M._check(mods, plugin_names)
|
||||
vim.print('')
|
||||
|
||||
-- Quit with 'q' inside healthcheck buffers.
|
||||
vim.keymap.set('n', 'q', function()
|
||||
if not pcall(vim.cmd.close) then
|
||||
vim.cmd.bdelete()
|
||||
vim._with({ buf = bufnr }, function()
|
||||
if vim.fn.maparg('q', 'n', false, false) == '' then
|
||||
vim.keymap.set('n', 'q', function()
|
||||
if not pcall(vim.cmd.close) then
|
||||
vim.cmd.bdelete()
|
||||
end
|
||||
end, { buffer = bufnr, silent = true, noremap = true, nowait = true })
|
||||
end
|
||||
end, { buffer = bufnr, silent = true, noremap = true, nowait = true })
|
||||
end)
|
||||
|
||||
-- Once we're done writing checks, set nomodifiable.
|
||||
vim.bo[bufnr].modifiable = false
|
||||
|
Reference in New Issue
Block a user