trouble.nvim
trouble.nvim copied to clipboard
bug: unhandled promise rejection when trying to open results from trouble
Did you check docs and existing issues?
- [x] I have read all the trouble.nvim docs
- [x] I have updated the plugin to the latest version before submitting this issue
- [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)
nightly
Operating system/version
MacOS 26.1
Describe the bug
Say I make a grep and sending search results to trouble. Iterating over a search result element fails with:
Error 12:26:32 notify.error Trouble Unhandled promise rejection:
```lua
...l/share/nvim/lazy/trouble.nvim/lua/trouble/view/init.lua:287: Cursor position outside buffer
stack traceback:
...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:34: in function 'transition'
...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:48: in function 'reject'
...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:81: in function <...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:67>```
My assumption is that it might be related to git worktrees, but I'm not sure. Opening the same search in quickfix works as expected.
Steps To Reproduce
- Search for something with live_grep (snacks)
- press
<a-t> - trying to navigate within search results with
[q
Expected Behavior
The resulting buffer is open
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
{ "folke/trouble.nvim", opts = {} },
-- add any other plugins here
},
})
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.
Not stale