Tyler leonhardt/quick access highlight fix#131292
Merged
TylerLeonhardt merged 5 commits intomainfrom Aug 23, 2021
Merged
Conversation
bpasero
approved these changes
Aug 21, 2021
Member
bpasero
left a comment
There was a problem hiding this comment.
This is a very elegant fix, good job 👍
Please add a test too that covers this case: highlights are proper when allowNonContiguousMatches: false for the standup file case.
src/vs/base/common/fuzzyScorer.ts
Outdated
| // found out this is contiguous otherwise there wouldn't have been a score | ||
| queryIndexGtNull || | ||
| // lastly check if the query is completely contiguous at this index in the target | ||
| target.startsWith(query, targetIndex) |
Member
There was a problem hiding this comment.
A micro-optimization would be to not check for startsWith if query length = 1 because if we have a score, it means the character must match. But not sure its worth it.
Member
Author
There was a problem hiding this comment.
sounds like the difference is comparing a single character string vs a number... it is faster... but this if statement is already big enough, I think I'd rather leave that optimization out for simplicity
This was referenced Aug 23, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just the "quotes" support from #131215 fixing the highlighting problem so typing:
"26"will actually highlight 2020-7-26and not2020-7-26.