8.0.02 How to avoid selection losing syntax colouring?
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
8.0.02 How to avoid selection losing syntax colouring?
Anyone know how to prevent selecting text losing the syntax highlighting e.g. unselected:
(coloured text)
Selected:
(All white text)
This is with default syntax highlighting
and affects all file types that I have tried.
(coloured text)
Selected:
(All white text)
This is with default syntax highlighting
and affects all file types that I have tried.
I never expect a selection to show syntax highlighting, as the selection itself is already using its own colors. Textpad could only safely achieve this by not using specific highlighting colours, but instead always showing the negative colors (of both text and background), so highlighting colors would never collide with other colors and result in making text unreadable.
For the developers: Notepad++ keeps syntax highlighting, but is not color collision proof either:
For the developers: Notepad++ keeps syntax highlighting, but is not color collision proof either:
Not necessarily. The TextPad selection makes it the users choice. This user has not specified a selection foreground coluor, instead specifying automatic. He expected that to yield the colours chosen elsewhere - on syntax.AmigoJack wrote:I never expect a selection to show syntax highlighting, as the selection itself is already using its own colors.
Not at all. It could show the existing colours unchanged. Just as my chosen non-selected background colour makes those foreground colours safe, so does my chosen selected background colour.AmigoJack wrote: Textpad could only safely achieve this by not using specific highlighting colours, but instead always showing the negative colors (of both text and background), so highlighting colors would never collide with other colors and result in making text unreadable.
I see no colour collision there. What I do see is the kind of result I was expecting from TextPad.AmigoJack wrote:For the developers: Notepad++ keeps syntax highlighting, but is not color collision proof either:
Last edited by chrisjj on Thu Nov 03, 2016 2:24 pm, edited 1 time in total.
When one of your syntax text colors is red and your selection text color is maroon you'll see what I mean by color collision. A more drastic example would be a black selection background encountering black syntax highlighting text.chrisjj wrote:It could show the existing colours unchanged.
I never said there is one. I said Notepad++'s approach is not collision proof - that means: you have to pay attention on which colors you choose here and there and none of them are too similar. Using selection colors that are always the negation of the (normal) display colors would never hit that problem.chrisjj wrote:I see no colour collision there.
Well that would be a silly choice, wouldn't it.AmigoJack wrote:When one of your syntax text colors is red and your selection text color is maroonchrisjj wrote:It could show the existing colours unchanged.
And anyway, as I said, my colours are the defaults.
Thanks for the clarification.AmigoJack wrote:I never said there is one. I said Notepad++'s approach is not collision proofchrisjj wrote:I see no colour collision there.
I'm not asking for collision-proofing. I'm just asking for preservation of (non-colliding, default) syntax colours.
I'd love to know where I need to pay attention to solve the actual problem about which I am asking.AmigoJack wrote: - that means: you have to pay attention on which colors you choose here
I wonder what makes you think it was never intended.AmigoJack wrote:A bug is something that is not working as intended, and syntax highlighting in your text selection was never intended.
I see nothing on the UI indicating e.g. my keyword colour is supposed to disappear when the keyword is selected.
If that was the intent, then what could have been the intent of the Foreground Colour: Automatic option which is present and currently totally redundant.
- Keywords #1 are displayed with blue background and white text,
- Keywords #2 are displayed with white background and black text.
- If your selection background is black and the text color wouldn't change (speak: syntax highlighting would still apply), you'd have a problem with keywords #2 and their black text on the selection's black background.