-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] Updated: Highlight search feature #2534
Comments
Note that I could have gone further and actually changed the markText() style on the fly whenever the "current match" changes. This would have given us even more freedom in color choice (100% in fact), but made the code more complex. It didn't seem worth it, since I'm pretty sure we'll have to do something completely different in the future if we want highlights to stay visible when focus returns to the editor. The fundamental challenge is that CodeMirror draws highlights on top of the selection color, while in most UIs with persistent highlighting (e.g. IntelliJ or Chrome's search bar) it's the opposite. We'd be back to square one in terms of needing colors that look good blended against both the default bg and the selection color bg (in fact two different selection colors -- focused and not). So I think we may need to do something more radical at that point. |
Note to self: I have a few stashed code cleanups to include in the commit along with Garth's suggested colors whenever I pull those in. |
Note that soswow's original commits were reviewed earlier in #2485. Feel free to review this whole diff anyway, but as a shortcut you could just look at a diff of my changes. |
Btw -- I've tested this on CMv3 and it works well there too. The merge was a little thorny, so |
Your comment says "Lower bailout threshold from ~2MB to 500K (I tested on a 1 MB file and it seemed pretty sluggish)", but this pull request raises the threshold from 2k lines to 500k lines. 2m lines was the intermediate threashold set by the |
FYI, merging the latest code fixed the problem with menus. In case you want to start making changes, I am done with initial review, except for unit tests. |
Re the bailout threshold: my note above is listed under the heading "changes from the original pull request," and relative to soswow's pull request this patch does indeed lower the threshold. Sorry for any confusion. |
|
Looks good. Merging. |
Thanks! |
Thanks! |
Friday Jan 25, 2013 at 01:13 GMT
Originally opened as adobe/brackets#2662
Now ready for review & merge -- color choices have been ok'ed by
@
GarthDB's.This is an updated version of #2485, using a hack suggested by NJ to give us a bit more flexibility in highlight colors:
This doesn't give us 100% flexibility -- in particular, the "generic result" color must be transparent and must look good blended atop both the normal editor bg color and atop the "current result" bg color.
I also made a few other changes from the original pull request:
peterflynn included the following code: https://github.com/adobe/brackets/pull/2662/commits
The text was updated successfully, but these errors were encountered: