Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

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

Open
1 task done
imaginedbyme opened this issue Jul 28, 2019 · 6 comments
Open
1 task done

Comments

@imaginedbyme
Copy link

imaginedbyme commented Jul 28, 2019

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
Copy link

rsese commented Jul 29, 2019

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?

@JulianHQ
Copy link

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
Copy link

rsese commented Jul 29, 2019

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

@imaginedbyme
Copy link
Author

My apologies, I'm running Windows 10

@rsese
Copy link

rsese commented Jul 30, 2019

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.

@rsese rsese changed the title Finder no longer equating underscores with possible slashes/spaces Fast scoring doesn't match underscore as path separators on Windows Jul 30, 2019
@JulianHQ
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants