Bracket highlighting in Editor Now highlights too many

I’m using 13.1.0.16 and checked it against the production release 13.0.0.80 which works fine.

If you have a statement which uses nested brackets, the editor used to be clever enough to highlight the corresponding close bracket when you put your cursor on an open bracket (and vice versa). Now, this only works for the outermost pair of brackets; if I highlight any of the inner brackets, the outer brackets are highlighted too.

This makes it very difficult now when editing a large block of code to quickly see where bracketed portions of code start and end. I was recently editing some code and put my cursor on an open bracket up near the top as I needed to see where the close bracket was so that I could insert another inline view after it but actually there were 4 close brackets highlighted along with 3 more open brackets above my cursor.

While you could say that the close bracket I want is the 1st one I come to, it’s certainly not as easy to identify as just having the correct one highlighted and no others. I’ve looked through the settings and can’t see anything obvious so I guess someone has made a change to the way it works in the editor?

Use this simple example (obviously it won’t run): Select Trim( Nvl2( bob, To_char( x ), ‘0’ ) ) From Dual

Put your cursor on the 1st bracket and the 1st and last are highlighted. Put it on the Nvl bracket and 4 are now highlighted. Now the one on the To_Char and all 6 are highlighted! try this in 13.0.0.80 and only the pairs are highlighted.

Thanks,

Mark.

Recently the behavior of older versions of Toad was restored where bracket highlighting now occurs when the caret is located anywhere within the group. In more recent versions the caret had to be adjacent to the bracket. Older Toad would only show the group immediately in scope, but I’ve modified it to show all groups in scope thinking it would aid in complex nesting. I’ll look at trying to visualize that differently. Perhaps a different shade of your bracket matching color for outer groups? The one immediately in scope could highlight as it always has and outer groups somewhat less in your face.

Michael

1 Like

I could live with that! Thanks Michael.

I’m guessing you haven’t got round to this yet Michael? I’m now using 13.1.0.34 and nothing has changed; any idea when you’ll be able to take a look at it?

Thanks,

Mark.

I am facing the same issue. When I highlight a bracket, Toad automatically highlights the corresponding bracket. While this is good, it highlights all the outermost brackets as well.

We are using version 13.1.0.78.

Have there been any updates on finding a solution to this?

Thanks,
Dennis

Just want to leave a +1. Highlighting the innermost group differently would be very helpful

1 Like

v16.2.98, and almost 3 years later and still no fix? Very irritating!

1 Like

My apologies. I've just logged it officially and placed it into the next sprint so it will not be forgotten. I believe an option to highlight all or only the innermost would be the most appropriate course of action here.

Great news! I'm really looking forward to this fix.

The next beta has some changes here. There are now 4 options for brace highlighting. They can be found on the Editor|Display page in Options.

  • None - Highlighting is disabled.
  • All pairs in scope - This is the current behavior where all pairs containing the caret are marked.
  • Innermost pair in scope - This only highlights the single pair most closely containing the caret and this is how older versions of Toad behaved.
  • Pair adjacent to caret - Only the pair of braces touching the caret position are marked. This is consistent with some other IDEs.
1 Like

I would like something similar to what is available for Visual Studio, where it is really easy to see what belongs togather

Out of the box, Visual Studio highlights similar to the "Pair adjacent to caret." I have not used that third party extension before. This one will be more challenging and perhaps not come for some long time, if at all. We are limited in how many indicators can be defined in the edit control. We probably have enough unused slots now to cover a few layers of nesting, but deeply nested blocks will be a problem. More thought is needed and likely it would have to be handled much differently than the current method. We also have to take into consideration the new color schemes and choose colors that do not conflict with other styles, etc. This is a big one.

I totally understand that it is a huge task, but one can always dream :slight_smile:

We've discussed some ideas and it will be logged to look into. One of the ideas is to not allow an endless nesting, but instead support like 3 levels and then the colors repeat or something like that.

1 Like