Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Highlight matching () and {} not working for macro
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

hunt007
Senior Member

27 Posts

Posted - Aug 19 2016 :  09:22:02 AM  Show Profile  Reply with Quote
Specifically multi lined macro.

quote:

#define SPLAY_LINKLEFT(head, tmp, field) do { SPLAY_LEFT(tmp, field) = (head)->sph_root; tmp = (head)->sph_root; (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); } while (/*CONSTCOND*/ 0)



The highlighting does not work unless we remove "#define"

ChrisG
Whole Tomato Software

USA
299 Posts

Posted - Aug 19 2016 :  10:47:48 AM  Show Profile  Reply with Quote
Hunt007,

I see no reason that highlight matching X shouldn't work in macros.

I have categorized it as a feature request, and opened it as case 99525.

Thanks for taking the time to mention it to us!
Go to Top of Page

hunt007
Senior Member

27 Posts

Posted - Aug 20 2016 :  03:14:49 AM  Show Profile  Reply with Quote
Hi ChrisG,

I think this is a bug not a feature because Highlight of matching () and {} works flawlessly if I remove the "#define".

Can you confirm if you can reproduce the issue locally?

Edited by - hunt007 on Aug 20 2016 03:20:55 AM
Go to Top of Page

hunt007
Senior Member

27 Posts

Posted - Aug 24 2016 :  11:54:13 AM  Show Profile  Reply with Quote
bump
Go to Top of Page

ChrisG
Whole Tomato Software

USA
299 Posts

Posted - Aug 24 2016 :  4:14:25 PM  Show Profile  Reply with Quote
Oh goodness somehow I missed the notification, my apologies!

Yes, I confirm that I can reproduce what you say. I think what you are experiencing is the highlighter disabling itself whenever it sees a define. I believe this is the expected behavior, which is why I categorized it as a feature request.

I assure you that feature requests as well as bugs receive attention from the developers, and I will note on the case that it may in fact be a bug as well.
Go to Top of Page

ChrisG
Whole Tomato Software

USA
299 Posts

Posted - Aug 24 2016 :  5:15:09 PM  Show Profile  Reply with Quote
I spoke with a developer on this issue, and he said part of the reason is simply that many of our users use defines which contain imbalanced braces. That's something that's legal in defines (as is anything, really), but isn't legal in regular C++ for example. To them the feature might actually be a distraction perhaps.

I speculate this is more of an issue than it seems at first as the only way to really solve this is for the highlighter to know that it's in a #define, and to know how #defines are extended. That would require the highlight to be tied into the main parser, which is heavyweight and slower. Etc.

Hope I helped you some :)
Go to Top of Page

hunt007
Senior Member

27 Posts

Posted - Aug 29 2016 :  12:36:07 PM  Show Profile  Reply with Quote
quote:
Originally posted by ChrisG

users use defines which contain imbalanced braces



Majority of #define macros uses balanced braces.

I don't really understand your explanation as to why doing this is difficult. But I sense you guys don't want to do this.

I guess I'll just have to use visual studio's "Highlight matching token" feature which works for #define macros and disable the visual assist's buggy feature.
Go to Top of Page

ChrisG
Whole Tomato Software

USA
299 Posts

Posted - Aug 29 2016 :  12:40:52 PM  Show Profile  Reply with Quote
Input like yours helps guide us to what features and improvements are most important to our users for future releases.

It really does make a difference.

I appreciate your feedback.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000