mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 04:18:18 +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]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
056dbf3ea7
commit
adfd4b9f4f
@@ -449,11 +449,15 @@ function M._check(mods, plugin_names)
|
|||||||
vim.print('')
|
vim.print('')
|
||||||
|
|
||||||
-- Quit with 'q' inside healthcheck buffers.
|
-- Quit with 'q' inside healthcheck buffers.
|
||||||
vim.keymap.set('n', 'q', function()
|
vim._with({ buf = bufnr }, function()
|
||||||
if not pcall(vim.cmd.close) then
|
if vim.fn.maparg('q', 'n', false, false) == '' then
|
||||||
vim.cmd.bdelete()
|
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
|
||||||
end, { buffer = bufnr, silent = true, noremap = true, nowait = true })
|
end)
|
||||||
|
|
||||||
-- Once we're done writing checks, set nomodifiable.
|
-- Once we're done writing checks, set nomodifiable.
|
||||||
vim.bo[bufnr].modifiable = false
|
vim.bo[bufnr].modifiable = false
|
||||||
|
Reference in New Issue
Block a user