flx icon indicating copy to clipboard operation
flx copied to clipboard

Fix incorrect word count for camelCase.

Open Fuco1 opened this issue 10 years ago • 5 comments

The variable word-count is only determined on flx-word-p which doesn't break on camelCase changes. OTOH, words-length properly reflects the number of words (based on flx-boundary-p.

Further, we might probably want to remove the word-count variable alltogether, it doesn't serve any purpose as it just mirrors words-length but in an inconsistent way.

Fuco1 avatar Oct 17 '15 14:10 Fuco1

This change breaks legit tests (yay testing!). I will think about refactoring the code around this. It's pretty hard for me to parse the code 1+ years on though.

lewang avatar Oct 18 '15 19:10 lewang

Well it probably breaks the examples which tested the wrong case originally. It seems only those where the property is violated fail.

Fuco1 avatar Oct 18 '15 19:10 Fuco1

This is the valid test I'm talking about - https://github.com/lewang/flx/blob/master/tests/flx-test.el#L296 .

lewang avatar Oct 18 '15 19:10 lewang

I haven't forgotten about this. There are some other optimizations coming in and I'll revisit this after that PR is merged.

lewang avatar Oct 27 '15 19:10 lewang

Thanks for the update.

Fuco1 avatar Oct 27 '15 21:10 Fuco1