-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: <C-w>
cause error in fuzzy search mode
#97
Comments
@willothy I believe you can come up with a better fix to this bug than I can. |
For sure, I'll look into this tomorrow. |
problem: since a large portion of `on_update` is inside of a `vim.schedule` closure - if all input buffer text is removed quickly, fzf entries can have their `pos` field removed before the `vim.schedule` callback executes, causing an error. solution: add a check to ensure that `fzf_entry.pos` is not nil before iterating and setting extmarks fixes Bekaboo#97
Nevermind, found it pretty quickly. Can you see if that works? The issue is a race condition with the ordering of the first half of |
problem: since a large portion of `on_update` is inside of a `vim.schedule` closure - if all input buffer text is removed quickly, fzf entries can have their `pos` field removed before the `vim.schedule` callback executes, causing an error. solution: add a check to ensure that `fzf_entry.pos` is not nil before iterating and setting extmarks fixes #97
Description
In fuzzy search mode, deleting texts before cursor using
<C-w>
or<C-u>
etc. will makefzf_entry.pos
tonil
, triggering an error indropbar.nvim/lua/dropbar/menu.lua
Line 1042 in 1a6c879
nvim version
v0.10.0-dev-1224+gdfa8b582a6
dropbar.nvim version
1a6c879
Operating system and version
Linux 6.1.54.15.realtime1-2-rt-lts
Minimal config
Steps to reproduce
minimal.lua
telescope-fzf-native
is in&rtp
nvim -u minimal.lua
i
to enter fuzzy search mode<C-w>
to delete word before cursorExpected behavior
Should not error
Actual behavior
Error.
Additional information
simplescreenrecorder-2023-09-29_20.42.13.mp4
The text was updated successfully, but these errors were encountered: