lotabout / skim

Fuzzy Finder in rust!
MIT License
5.1k stars 183 forks source link

Different highlighting with NUL character in text #547

Open tobx opened 11 months ago

tobx commented 11 months ago

Hello,

I came across some weird behavior. When there is a NUL character in the string and the string includes a phrase multiple times, then searching for that phrase will highlight the last appearance of that phrase as match, instead of the first one.

This highlights the last appearance of Test in the interactive finder.

echo "\0Test Test Test" | sk -q Test

This highlights the first appearance of Test in the interactive finder.

echo "Test Test Test" | sk -q Test

That seems like a bug to me, but I am not sure.