atom/fuzzy-finder

`Fast` scoring doesn't match underscore as path separators on Windows

imaginedbyme opened this issue · 6 comments

Prerequisites

Description

(I'm afraid I don't have the version numbers to hand)
When using Fuzzy Finder, I used to be able to just dump my entire class name into it, and it'd split it based on underscores and correctly find the file. For example if my class was Mob_NPC_Human_Merchant, and I put my class name into the fuzzy finder, it would bring up the file Mob/NPC/Human/Merchant.php, it stopped working when fast mode was enabled, so I disabled it, and now after the most recent update it doesn't work at all anymore. It's been working correctly for over a year.

Steps to Reproduce

  1. Place a file in nested folders
  2. Attempt to fuzzy find the file using underscores instead of slashes

Edit by @rsese to add more detailed repro steps

Using Git Bash on Windows and with Settings > Packages > Fuzzy Finder > Scoring System set to fast:

  1. mkdir -p Mob/NPC/Human
  2. touch Mob/NPC/Human/Merchant.php
  3. atom .
  4. Ctrl+t
  5. Copy/paste "Mob_NPC_Human_Merchant"

Expected behavior:

It brings up "Mob/NPC/Human/Merchant.php" as a result of your search.

Actual behavior:

It brings up no files at all.

Reproduces how often:

Everytime.

Versions

I'm currently running 1.39.1, it worked before I updated.

Additional Information

None, if this change is intended I understand, but I hope there is some configuration option that lets me go back to how it used to work, else my main reason for using fuzzy find with my project has kinda gone out the window.

rsese commented

Thanks for the report! I think this was addressed in atom/fuzzy-native#6 and that fix should be in 1.39 - this is what I see in 1.39.1 on macOS 10.14 with fast mode enabled:

php-fuzzy-find

Did I misunderstand your repro steps? Also, what OS are you running?

I'm facing this issue also. Last time I used the feature was on Friday, July 26th and it was working fine. Now it does not, this is what I get:

image

This is what I would expect..

image

rsese commented

What operating system are you on @JulianHQ? I'll test on Windows and see if there's any difference there.

My apologies, I'm running Windows 10

rsese commented

Ahh ok, I can reproduce with 1.39.1 on Windows 10:

windows-fuzzy

@JulianHQ, as @imaginedbyme mentioned, if you really need this functionality for your workflow, you can temporarily set Settings > Packages > Fuzzy Finder > Scoring System to alternate.

Thank you. It works by setting the scoring system to alternate. Just quick note, I'm using version 1.14.0 of fuzzy finder:

image