DONE: ability to change highlight/style of unmatched brace

Make a request or discuss new features.
Post Reply
crtrubshaw
Posts: 322
Joined: 06 Jun 2012 11:08

DONE: ability to change highlight/style of unmatched brace

Post by crtrubshaw »

Hi Rickard.

I posted a question how to do this but no-one knows the answer, so I guess maybe it's not possible. Please can you look into adding this functionality?

Many thanks.
User avatar
yereverluvinuncleber
Posts: 367
Joined: 20 Apr 2018 09:49

Re: Suggestion: ability to change highlight/style of unmatched brace

Post by yereverluvinuncleber »

Nice idea.
"Noli pati a scelestis opprimi"... or is it "non lacessit illegitimae te carborundum"?

You can find me on Deviantart https://www.deviantart.com/yereverluvinuncleber/gallery/
User avatar
Rickard Johansson
Site Admin
Posts: 6577
Joined: 19 Jul 2006 14:29

Re: Suggestion: ability to change highlight/style of unmatched brace

Post by Rickard Johansson »

The foreground and background color for unmatched braces can be changed in the next release (v15.85).
Thanks!
crtrubshaw
Posts: 322
Joined: 06 Jun 2012 11:08

Re: DONE: ability to change highlight/style of unmatched brace

Post by crtrubshaw »

Thanks Rickard, I got the v15.85 update and it doesn't seem to be working correctly, specifically the foreground colour doesn't get applied.
User avatar
pjj
Posts: 2109
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: DONE: ability to change highlight/style of unmatched brace

Post by pjj »

FWIW it works for me alright.

I noticed only opening unmatched bracket is highlighted; is it by design?
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
User avatar
Rickard Johansson
Site Admin
Posts: 6577
Joined: 19 Jul 2006 14:29

Re: DONE: ability to change highlight/style of unmatched brace

Post by Rickard Johansson »

I noticed only opening unmatched bracket is highlighted; is it by design?
With option to highlight surrounding braces, the background thread first try to find an opening bracket, then find a closing one. If you remove the opening bracket - the thread will find another opening bracket further up in your code and match that one with a closing bracket. So yes, it's by design :?
User avatar
pjj
Posts: 2109
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: DONE: ability to change highlight/style of unmatched brace

Post by pjj »

Rickard Johansson wrote: 18 Apr 2023 09:11 If you remove the opening bracket - the thread will find another opening bracket further up in your code and match that one with a closing bracket.
And if it doesn't find it?

Code: Select all

<?php
)
The bracket in the code above is unmatched, yet not treated as such. Please notice I'm not saying it is necessarily a bad thing; I have no opinion -- my brackets are usually matched 8)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
crtrubshaw
Posts: 322
Joined: 06 Jun 2012 11:08

Re: DONE: ability to change highlight/style of unmatched brace

Post by crtrubshaw »

If it only works highlighting opening braces without a closing brace, so be it, but it still does not apply the selected foreground colour on unmatched opening braces (for me at least).
crtrubshaw
Posts: 322
Joined: 06 Jun 2012 11:08

Re: DONE: ability to change highlight/style of unmatched brace

Post by crtrubshaw »

Hi Rickard, the colouring just isn't being applied for me, can you think of any settings which might be stopping it from working?

Thank you.

20230425-0937.png
20230425-0937.png (94.28 KiB) Viewed 1906 times
crtrubshaw
Posts: 322
Joined: 06 Jun 2012 11:08

Re: DONE: ability to change highlight/style of unmatched brace

Post by crtrubshaw »

Any ideas? In my previous post, the opening brace is missing but the highlight is not being applied?

Thanks.
User avatar
Rickard Johansson
Site Admin
Posts: 6577
Joined: 19 Jul 2006 14:29

Re: DONE: ability to change highlight/style of unmatched brace

Post by Rickard Johansson »

I'm a bit occupied with other things at the moment, but I'll see if I can fix it in next release (v15.90).
User avatar
Rickard Johansson
Site Admin
Posts: 6577
Joined: 19 Jul 2006 14:29

Re: DONE: ability to change highlight/style of unmatched brace

Post by Rickard Johansson »

I can't reproduce this or see anything that would cause this, unless you've modified the syntax file.

I did make a small improvement to use the error foreground color as font color with all options (underline, frame...).
crtrubshaw
Posts: 322
Joined: 06 Jun 2012 11:08

Re: DONE: ability to change highlight/style of unmatched brace

Post by crtrubshaw »

That was for All Languages, I'll try setting it per language...
Post Reply