Hi,
I am trying to figure out, what is intended currently, and/or what may
be acceptable.
At current the implementation of the Ctrl Mouse Link suggests that out
of the RGB values, the bllue value is to be inverted. This works fine on
words in normal text (identifiers), which turn from black to blue.
Comments just stay blue (instead of getting black), compiler directives
just stay red (instead of getting pink (red+blue).
This is because currently CtrlMouseLinks are only re-colored if the word
to which the apply is a separate token.
> if (fLastCtrlMouseLinkY<>CurLine)
> or (nTokenPos+1<>fLastCtrlMouseLinkX1)
Each identifier is returned as a separate token, even if there are no
highlighter changes to the token before/after. So they are highlighted.
Blocks or Compiler-Directives are one whole token across all the words
contained in them. So they *normally* do not benefit highlighting.
Except of course, if you break them across lines (there must be no
leading or trailing spaces)
{$I
unit1.lrs
}
(*
abc
*)
In those examples "unit1.lrs" will turn pink. "abc" will turn black.
On the other Hand if ever an optimizer should bundle other words (like
identifiers with the separating dots) into one word, then the current
method would fail as well.
Now the question is what is intended or acceptable as future behaviour
(because I am moving the code and the token boundary will loose
importance, so the inconsistent coloring of directives/blocks will go).
===> But which color should a CtrlMouseLink in a directive/Comment have?
I personally dislike the pink. They could stay red as they do currently
(with a blue underline) or the could just turn blue as normal text. And
comments could stay blue to?
Maybe the color could even be configured in the Editor Environment ?
Best Regards
Martin
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus