Skip to content
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

fix(fzf): ensure fzf_entry.pos is non-nil in on_update #98

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

willothy
Copy link
Collaborator

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

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
@Bekaboo
Copy link
Owner

Bekaboo commented Sep 29, 2023

Thx!

@Bekaboo Bekaboo merged commit 9fc12e3 into Bekaboo:master Sep 29, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: <C-w> cause error in fuzzy search mode
2 participants