You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues of trouble.nvim
I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.10
Operating system/version
Ubuntu 22.04
Describe the bug
Most of the time, after running something like ':Trouble qflist toggle', if i then call ':lua require('trouble').next()' or ':Trouble next', it doesn't work correctly. If I move my cursor into the trouble window, and then execute ':lua require('trouble').next()', it does work.
This bug happens 80% of the time, but occasionally doesn't. To be clear, it only doesn't work if my cursor is not in the trouble buffer.
Steps To Reproduce
Get data in quickfix list (using grep or whatever)
Execute ":Trouble qflist toggle"
Your cursor should still be in your original buffer, not the trouble one. Now execute "lua require('trouble').next()" or ":Trouble next"
Most of the time, there will be a quick glitch like the screen is being redrawn, and you won't have moved to the next item in the list.
Expected Behavior
Should work with cursor outside of the buffer.
PS: side note, I noticed if I run the 'next' function when the trouble window is closed that an error occurs as the 'mode' has not been specified. I'm curious if there's a way to have the mode default to the last used one. That way if I populate the qflist or diagnostic list, I could close the trouble window and still navigate through the results.
Love the plugin, cheers my friend
Repro
-- DO NOT change the paths and don't remove the colorschemelocalroot=vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .reprofor_, nameinipairs({ "config", "data", "state", "cache" }) dovim.env[("XDG_%s_HOME"):format(name:upper())] =root.."/" ..nameend-- bootstrap lazylocallazypath=root.."/plugins/lazy.nvim"ifnotvim.loop.fs_stat(lazypath) thenvim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
endvim.opt.runtimepath:prepend(lazypath)
-- install pluginslocalplugins= {
"folke/tokyonight.nvim",
"folke/trouble.nvim",
-- add any other plugins here
}
require("lazy").setup(plugins, {
root=root.."/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
The text was updated successfully, but these errors were encountered:
Did you check docs and existing issues?
Neovim version (nvim -v)
0.10
Operating system/version
Ubuntu 22.04
Describe the bug
Most of the time, after running something like ':Trouble qflist toggle', if i then call ':lua require('trouble').next()' or ':Trouble next', it doesn't work correctly. If I move my cursor into the trouble window, and then execute ':lua require('trouble').next()', it does work.
This bug happens 80% of the time, but occasionally doesn't. To be clear, it only doesn't work if my cursor is not in the trouble buffer.
Steps To Reproduce
Expected Behavior
Should work with cursor outside of the buffer.
PS: side note, I noticed if I run the 'next' function when the trouble window is closed that an error occurs as the 'mode' has not been specified. I'm curious if there's a way to have the mode default to the last used one. That way if I populate the qflist or diagnostic list, I could close the trouble window and still navigate through the results.
Love the plugin, cheers my friend
Repro
The text was updated successfully, but these errors were encountered: