noice.nvim
noice.nvim copied to clipboard
bug: calling nvim_win_close for doc will make next open pin at left
Did you check docs and existing issues?
- [X] I have read all the noice.nvim docs
- [X] I have searched the existing issues of noice.nvim
- [X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
NVIM v0.10.0-dev-6308+ga090d43d6
Operating system/version
macos 14.2
Describe the bug
calling nvim_win_close for doc will make next open pin at left.
https://github.com/folke/noice.nvim/assets/97848247/cea3a540-ccca-4ef5-9061-1dafe1937d3f
Steps To Reproduce
- noice config
hover = {
enabled = true,
opts = {
size = {
max_height = 12,
max_width = 50,
},
border = {
style = "rounded",
padding = { 0, 2 },
},
position = { row = 2, col = 0 },
},
},
- close function
keymap({ "s", "i", "n" }, "<C-7>", function()
for _, win in pairs(vim.api.nvim_list_wins()) do
local success, win_config = pcall(vim.api.nvim_win_get_config, win)
if success then
if win_config.relative ~= "" then
vim.api.nvim_win_close(win, true)
end
end
end
end, opts)
- using K to hover doc, and <C-7> to close it , and K to hover again
Expected Behavior
the 2 hover have the same effect
Repro
default lazyvim add the keymap binding can reproduce
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.