adobe/brackets — pull request #3819 by dangoor (2013-05-14 14:26:42+00:00)
Title: Fix 2663: MultiRangeInlineEditor case

Note that this branch is built on dangoor/prefer-prefix, which I suspect will land first.

This is a fix for #2663. The original "problem" there is that MultiRangeInlineEditor-test has a backtrack in it, whereas MultiRangeInlineEditor does not, so searching for "multir" results in a different sort of match between the two strings. (MultiRangeInlineEditor vs. MultiRangeInlineEditor-test).

Looking at this result, though, the "fix" (adjusting backtracking behavior to give the same result both times) would change both matches to be more like MultiRangeInlineEditor, when arguably they should be more like MultiRangeInlineEditor.

My fix should make the matching line up with scoring and user intent a bit better. If the user has already typed two characters in a row that match, the code now makes the assumption that the user may be trying to put a contiguous string together and tries that first. I think the results are generally better with this scheme. Note that it changed some pre-existing test cases (for the better, I think).

This change will also probably reduce some cases in which results appear to bounce around in the list as characters are typed.