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.
|
|
|