Recent

Author Topic: User defined markup colors also displayed in comments.  (Read 310 times)

GypsyPrince

  • New member
  • *
  • Posts: 8
User defined markup colors also displayed in comments.
« on: June 28, 2020, 06:07:20 pm »
Has anyone ever noticed before, that if a word is specified in the 'User Defined Markup' section, the word will also be displayed in the associated color if used in a comment?

Is this a bug? Just perhaps overlooked?


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6455
    • wiki
Re: User defined markup colors also displayed in comments.
« Reply #1 on: June 28, 2020, 07:21:15 pm »
Yes, that is by design.
They are not part of the Highlighter. They apply to any text in the editor.

Like the markup for the "word at caret", or the "current line" or even "selected text".

I do myself use them for some Pascal highlight (like assert, debugln, exit, break). And I live with the fact that they catch a few words in comments and strings.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6455
    • wiki
Re: User defined markup colors also displayed in comments.
« Reply #2 on: July 10, 2020, 09:53:54 pm »
I added some more options in trunk / 2.1.
But, disclaimer: the indent of the "user defined markup" is still what it was.


In trunk, you can now set priorities to base-colors too (i.e., priority for comment or string color)

If you set a user defined markup, with foreground=red, and fore-priority=1
And you change the comment and strings fore-priority to 2
then the markup will not be visible in strings/comments

Note: "will not be visible"
It is still there. The Editor still finds the match, and thinks of it as a match. But the color will be hidden, by the priority system.

If your search term has "//" in it, like "readln; // comment", and you have that text in the source, then it will color up to the //. After that it will become hidden (but still match).

If you have background color, or bold...., then you need those priors too.

Be carefully not to raise colors of comment (and other base colors) to high. If you do, then markup like highlighting the selected text, will be suppressed too.

 

TinyPortal © 2005-2018