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

Regexp groups in find/replace text field obscured by highlighting #39

Closed
gertsonderby opened this issue Nov 2, 2016 · 5 comments
Closed
Labels
Milestone

Comments

@gertsonderby
Copy link

gertsonderby commented Nov 2, 2016

When typing in a regular expression in the find dialog, I encounter an unhappy interaction between Nord theme and Nord syntax - The plain-text contents of group matches (e.g. 'Le' in Who (Le)* Foo) are syntax highlighted white, and the background of the active search field is white. Hence the text is invisible. Selecting the text makes it visible again by virtue of the light grey selection highlight, but it does cause a small bit of irritation every now and then.

I'm not sure what the best solution here might be - a modification of the syntax highlighting when in a dialog field? A different focus highlight color for these fields?

@arcticicestudio
Copy link
Contributor

arcticicestudio commented Nov 2, 2016

Thanks for your report, I'll take a look at it as soon as possible.
Could you provide a test text, the regexp and maybe a screenshot please? This way it'll be easier for me to reproduce the scenario.

@gertsonderby
Copy link
Author

gertsonderby commented Nov 2, 2016

Here's as detailed a replication report as I can make.

Steps:
1: Atom with Nord UI and syntax themes
2: Open a file (any text file type, including a new or empty file)
3: Open find or find-in-files dialog
4: Switch on regexp search
5: Focus on search field
6: Enter the following regexp: (test)

Expected:
Regexp search string should be fully visible.

Actual:
While search field focused, only the parentheses are visible, the string 'text' is white on white.
If focus is removed, regexp is fully visible.

@arcticicestudio
Copy link
Contributor

arcticicestudio commented Nov 6, 2016

Thanks for your detailed feedback, this will be fixed as soon as I've finished the refactoring of my previous theme packages and also got notified about this by another user as seen by the cross-repository reference marker above.

@arcticicestudio
Copy link
Contributor

arcticicestudio commented Nov 15, 2016

@gertsonderby I was able to reproduce this, but its a bit tricky to fix this due to the fact that the highlighting depends on the selected syntax theme. The regexp pattern inherits the CSS rules defined by the current syntax theme which is the javaScript js selector in your example ((test)).

It is possible to set the text color for the focused input to the default dark color, but this will remove all other syntax highlighting colors of this pattern e.g. if the current syntax theme uses a red color for braces.

ghi-39-scrcast-workaround

I added an theme setting in #43 to use a darker form-focusing effect which can help to avoid this bug too.

ghi-39-scrcast-reference-ghi-43

Anyway, I'll add the dark text workaround described above and you can decide whether you want to use the new theme setting to have colored syntax highlighting for regexp searchs too.

@arcticicestudio
Copy link
Contributor

Released in 📦 version 0.8.0

@arcticicestudio arcticicestudio added this to the 0.8.0 milestone Jul 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants