Skip to content

Fix incorrect word count for camelCase.#74

Open
Fuco1 wants to merge 1 commit into
lewang:masterfrom
Fuco1:master
Open

Fix incorrect word count for camelCase.#74
Fuco1 wants to merge 1 commit into
lewang:masterfrom
Fuco1:master

Conversation

@Fuco1

@Fuco1 Fuco1 commented Oct 17, 2015

Copy link
Copy Markdown

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.

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

lewang commented Oct 18, 2015

Copy link
Copy Markdown
Owner

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.

@Fuco1

Fuco1 commented Oct 18, 2015

Copy link
Copy Markdown
Author

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

@lewang

lewang commented Oct 18, 2015

Copy link
Copy Markdown
Owner

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

@lewang

lewang commented Oct 27, 2015

Copy link
Copy Markdown
Owner

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

@Fuco1

Fuco1 commented Oct 27, 2015

Copy link
Copy Markdown
Author

Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants