fzy-lua-native
fzy-lua-native copied to clipboard
Recent change seems to break wilder.nvim
Hi, I'm using wilder.nvim, and it depends on this plugin for its fuzzy search.
After the recent change, I'm getting an error for this line saying that:
wilder.nvim/lua/wilder/internal.lua:7: invalid order function for sorting
I'd appreciate if you let me know if there's a fix for this
My bad. I've reverted the changes for now.
I'll try to reproduce the bug locally. Any hints you can give me to debug this? Would you be able to show me the value of scores
before and after tha change?
Thanks for the report.
i think maybe it should be wilder to update it code?
This change is not supposed to be breaking, we're only moving files around in an API-compatible way.
Sorry for the late reply @romgrk , I got quite busy yesterday didn't get a chance to look into things.
we're only moving files around in an API-compatible way
I totally get what you mean, and, honestly, I was confused myself
Hopefully today, when I get a chance, I'll try to see what that scores
variable is by resetting fzy-lua-native
to different commits, and hopefully that would give a clue
Hey @romgrk , so I tried to see what the scores
variable is, and, since wilder
is depending on a[3]
and b[3]
, as I suspected, the returned tables don't have that
I'm getting QUITE a few ones since I think wilder
calls that function for every key press or something.
But, this is what I see with the refactored code:
{ { "!", {} }, { "#", {} }, { "&", {} }, ... }
And this is what I get with the old non-refactored code (or the reverted code):
{ { "!", {}, -inf }, { "#", {}, -inf }, { "&", {}, -inf }, ... }
Hopefully, this gives a clue. Let me know if you need any other information that can help