mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
fix(health): "q" should not close last window #31876
This commit is contained in:
@@ -409,13 +409,12 @@ function M._check(mods, plugin_names)
|
|||||||
vim.print('')
|
vim.print('')
|
||||||
|
|
||||||
-- Quit with 'q' inside healthcheck buffers.
|
-- Quit with 'q' inside healthcheck buffers.
|
||||||
vim.api.nvim_buf_set_keymap(
|
vim.keymap.set('n', 'q', function()
|
||||||
bufnr,
|
local ok, _ = pcall(vim.cmd.close)
|
||||||
'n',
|
if not ok then
|
||||||
'q',
|
vim.cmd.bdelete()
|
||||||
'<c-w>q',
|
end
|
||||||
{ silent = true, noremap = true, nowait = true }
|
end, { buffer = bufnr, silent = true, noremap = true, nowait = true })
|
||||||
)
|
|
||||||
|
|
||||||
-- 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