Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize: should highlight any non-empty search query, fix #3164 #3175

Merged
merged 1 commit into from
Aug 24, 2019

Conversation

hikerpig
Copy link
Contributor

Description

Digg a little into the situation that #3164 describes, turns out it has nothing to do with unicode characters.

The original msg.length < 3 threshold may be out of performance concern, but since I don't have that much notes kept, it doesn't seem an issue to me.

Type of changes

  • 🔘 Bug fix (Change that fixed an issue)

@Flexo013 Flexo013 added the awaiting review ❇️ Pull request is awaiting a review. label Jul 28, 2019
@ZeroX-DG
Copy link
Member

@hikerpig I think you should allow user to be able to customize this. Because some people would prefer performance more so it would be great if you can add a setting for this 👍

@hikerpig
Copy link
Contributor Author

@ZeroX-DG How about a editor.searchHighlightQueryLengthThreshold number setting? By default it should be 1.

Though I don't think it's necessary, since this highlight will not change any React vdom. It only operates current editor's CodeMirror instance, add some little highlight overlays ontop of matched contents.

@ZeroX-DG
Copy link
Member

hmm....you're right, we can just leave it as 1 since it doesn't affect anything 👍

Copy link
Member

@ZeroX-DG ZeroX-DG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@ZeroX-DG ZeroX-DG added approved 👍 Pull request has been approved by sufficient reviewers. and removed awaiting review ❇️ Pull request is awaiting a review. labels Aug 21, 2019
@Rokt33r Rokt33r removed the approved 👍 Pull request has been approved by sufficient reviewers. label Aug 24, 2019
@Rokt33r Rokt33r added this to the v0.13.0 milestone Aug 24, 2019
@Rokt33r Rokt33r merged commit 330a444 into BoostIO:master Aug 24, 2019
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.

4 participants