Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Minor C++ switch() autocomplete annoyances

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
matthewm Posted - Oct 14 2011 : 4:39:26 PM
In some cases, the following happens when autocompleting C++ keywords in a switch() statement with the "Commit selection at any character not valid in a symbol" option enabled:
- Typing "ca" and pressing space will expand to the "case" keyword followed by *two* spaces.
- Typing "br;" will expand to "break;;" instead of simply "break;". This is unlike typing e.g. "ret;" which will always correctly expand to "return;".

These can be easily reproduced by writing a switch statement, say simply switch(1) { }, then going inside the curly braces and typing a case or break as mentioned before.

I'm using VAX 10.6.1859 in VS2010 on Win7 x64.
2   L A T E S T    R E P L I E S    (Newest First)
matthewm Posted - Oct 15 2011 : 06:22:27 AM
Thanks for the quick reply, that did the job
sean Posted - Oct 14 2011 : 9:15:29 PM
The case and break suggestions are hardcoded in VA Snippets. You can edit the defaults:
VAssistX | Tools | Edit VA Snippets

In the left hand tree, locate the C++ root node and expand it.
Locate "SuggestionsForType switch" and remove the last character on each line in the right hand pane.

I'm not sure that VA should compare the commit character to the last character of the inserted text, but editing the defaults will give you the behavior you seek.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000