[X] I have searched the existing issues of trouble.nvim
[X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
NVIM v0.10.0-dev-1183+gc68c121f5-dirty (happens on nvim 0.8 and 0.9 too)
Operating system/version
Gentoo Linux
Describe the bug
If the user's focus is on a floating window when invoking :Trouble then :TroubleClose or using auto_open then the cursor will be placed in a non-floating window, not the original floating location.
Steps To Reproduce
Generic:
Open file.
Open a floating window.
Open Trouble with either :Trouble or auto_open.
Cursor is in the file buffer.
Using the below repro:
nvim -u repro.lua
:Lazy update
:Trouble
:TroubleClose
Cursor is in the file buffer when it should be in the Lazy pop-up
Expected Behavior
Cursor will be placed back in the floating window in the correct position.
Repro
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = true,
},
}, {})
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0-dev-1183+gc68c121f5-dirty (happens on nvim 0.8 and 0.9 too)
Operating system/version
Gentoo Linux
Describe the bug
If the user's focus is on a floating window when invoking
:Trouble
then:TroubleClose
or usingauto_open
then the cursor will be placed in a non-floating window, not the original floating location.Steps To Reproduce
Generic:
:Trouble
orauto_open
.Using the below repro:
nvim -u repro.lua
:Lazy update
:Trouble
:TroubleClose
Expected Behavior
Cursor will be placed back in the floating window in the correct position.
Repro