Browse files

fix 2068: rework quickopen logic to produce better results

Created a new QuickOpen matching algorithm that searches for matches
among "special characters" (path markers, camelCase changes) and
does so left-to-right rather than right-to-left as in the old algorithm.
The new algorithm does still give an added bonus to matches that occur
within the filename, which is checked first.

Also, there is now a collection of tests to try out the QuickOpen logic
and ensure that it is working sanely.

The scores look pretty sane now.

In this commit, I added some code to help debug scores and was
able to get the scores to be pretty sane and the results look quite

I also removed the dead code.

fix a display bug when there is no query

added comments for new QuickOpen algorithm.

Note that in the process I spotted a bug and added a failing test,
which I have not had a chance to fix yet.

partial fix for a bug in the new quickopen logic

fixed the bug with strings that are longer than the final segment

fix an off-by-one problem that left an initial character match out of
the last segment
  • Loading branch information...
dangoor committed Dec 20, 2012
1 parent 4f66e1b commit e654d09bf7a5ac4084e1235919263c95b93b757e
Showing with 730 additions and 225 deletions.
  1. +472 −203 src/search/QuickOpen.js
  2. +258 −22 test/spec/QuickOpen-test.js
Oops, something went wrong.

0 comments on commit e654d09

Please sign in to comment.