mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
fix(health): floating window closes when opening TOC (gO) #34794
Problem: Health check floating window gets closed when pressing 'gO' to show TOC because LSP floating preview system auto-closes on BufEnter events triggered by :lopen. Solution: Temporarily disable BufEnter event for the current window during TOC operations and adjust window layout to prevent overlap.
This commit is contained in:
@ -68,7 +68,10 @@ describe(':checkhealth', function()
|
||||
end)
|
||||
|
||||
it('vim.g.health', function()
|
||||
clear()
|
||||
clear {
|
||||
args_rm = { '-u' },
|
||||
args = { '--clean', '+set runtimepath+=test/functional/fixtures' },
|
||||
}
|
||||
command("let g:health = {'style':'float'}")
|
||||
command('checkhealth lsp')
|
||||
eq(
|
||||
@ -77,6 +80,14 @@ describe(':checkhealth', function()
|
||||
return vim.api.nvim_win_get_config(0).relative
|
||||
]])
|
||||
)
|
||||
|
||||
-- gO should not close the :checkhealth floating window. #34784
|
||||
command('checkhealth full_render')
|
||||
local win = api.nvim_get_current_win()
|
||||
api.nvim_win_set_cursor(win, { 5, 1 })
|
||||
n.feed('gO')
|
||||
eq(true, api.nvim_win_is_valid(win))
|
||||
eq('qf', api.nvim_get_option_value('filetype', { buf = 0 }))
|
||||
end)
|
||||
|
||||
it("vim.provider works with a misconfigured 'shell'", function()
|
||||
|
Reference in New Issue
Block a user