mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(health): "q" should not close last window #31876
This commit is contained in:
parent
ac5a6d9ff5
commit
570a8da01b
@ -409,13 +409,12 @@ function M._check(mods, plugin_names)
|
||||
vim.print('')
|
||||
|
||||
-- Quit with 'q' inside healthcheck buffers.
|
||||
vim.api.nvim_buf_set_keymap(
|
||||
bufnr,
|
||||
'n',
|
||||
'q',
|
||||
'<c-w>q',
|
||||
{ silent = true, noremap = true, nowait = true }
|
||||
)
|
||||
vim.keymap.set('n', 'q', function()
|
||||
local ok, _ = pcall(vim.cmd.close)
|
||||
if not ok then
|
||||
vim.cmd.bdelete()
|
||||
end
|
||||
end, { buffer = bufnr, silent = true, noremap = true, nowait = true })
|
||||
|
||||
-- Once we're done writing checks, set nomodifiable.
|
||||
vim.bo[bufnr].modifiable = false
|
||||
|
Loading…
Reference in New Issue
Block a user