8.0.02 How to avoid selection losing syntax colouring?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
chrisjj
Posts: 149
Joined: Sat Jan 21, 2006 10:32 pm

8.0.02 How to avoid selection losing syntax colouring?

Post by chrisjj »

Anyone know how to prevent selecting text losing the syntax highlighting e.g. unselected:

Image

(coloured text)

Selected:

Image

(All white text)

This is with default syntax highlighting

Image

and affects all file types that I have tried.
User avatar
AmigoJack
Posts: 490
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

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:
Image
chrisjj
Posts: 149
Joined: Sat Jan 21, 2006 10:32 pm

Post by chrisjj »

AmigoJack wrote:I never expect a selection to show syntax highlighting, as the selection itself is already using its own colors.
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: 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.
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:For the developers: Notepad++ keeps syntax highlighting, but is not color collision proof either:
Image
I see no colour collision there. What I do see is the kind of result I was expecting from TextPad.
Last edited by chrisjj on Thu Nov 03, 2016 2:24 pm, edited 1 time in total.
User avatar
AmigoJack
Posts: 490
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

chrisjj wrote:It could show the existing colours unchanged.
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:I see no colour collision there.
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
Posts: 149
Joined: Sat Jan 21, 2006 10:32 pm

Post by chrisjj »

AmigoJack wrote:
chrisjj wrote:It could show the existing colours unchanged.
When one of your syntax text colors is red and your selection text color is maroon
Well that would be a silly choice, wouldn't it.

And anyway, as I said, my colours are the defaults.
AmigoJack wrote:
chrisjj wrote:I see no colour collision there.
I never said there is one. I said Notepad++'s approach is not collision proof
Thanks for the clarification.

I'm not asking for collision-proofing. I'm just asking for preservation of (non-colliding, default) syntax colours.
AmigoJack wrote: - that means: you have to pay attention on which colors you choose here
I'd love to know where I need to pay attention to solve the actual problem about which I am asking.
User avatar
AmigoJack
Posts: 490
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

You can't solve it. :D

It's a feature request what are describing here.
chrisjj
Posts: 149
Joined: Sat Jan 21, 2006 10:32 pm

Post by chrisjj »

AmigoJack wrote:It's a feature request what are describing here.
Really?? What makes you think this behaviour isn't just a bug?
User avatar
AmigoJack
Posts: 490
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

Because I see it the same way: either syntax highlighting or text selection, not both at the same time. A bug is something that is not working as intended, and syntax highlighting in your text selection was never intended.
chrisjj
Posts: 149
Joined: Sat Jan 21, 2006 10:32 pm

Post by chrisjj »

AmigoJack wrote:A bug is something that is not working as intended, and syntax highlighting in your text selection was never intended.
I wonder what makes you think it 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.
User avatar
AmigoJack
Posts: 490
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

  • 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.
That's why I think it's intended for the selection to have its own state.
Post Reply