Author |
Topic |
|
dave_lf
Junior Member
15 Posts |
Posted - Sep 26 2013 : 12:31:47 PM
|
Suppose I have a function defined like so:
void SomeReallyReallyLongQualifiedFunctionName( int p1, int p2,
int p3 )
{
...
}
Now I decide I want to add a NameSpace::MyClass object as a fourth parameter. As soon as I type the second :, VA adds a bunch of tabs to indent the second line as shown (I had to type spaces here instead of tabs to get it to show up):
void SomeReallyReallyLongQualifiedFunctionName( int p1, int p2,
int p3, NameSpace:: )
{
}
I'm reasonably sure it's VA doing this because the behavior goes away if I disable it.
Is this a bug or a feature? If it's a feature, is there any way to disable it (I don't see anything relevant looking in the settings)?
|
Edited by - dave_lf on Sep 30 2013 09:27:43 AM |
|
dave_lf
Junior Member
15 Posts |
Posted - Sep 26 2013 : 12:42:20 PM
|
I should add: VA 10.7.1940.0 built 2013.05.30 VS2012 Professional with update 3 (11.0.60610.01)
Edit to add: I updated to 10.8.2001.0 today and the behavior is still there. And another detail I just figured out: this only happens if the start of the function definition is all the way at the left margin. |
Edited by - dave_lf on Sep 30 2013 09:27:55 AM |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Sep 26 2013 : 7:25:03 PM
|
I don't think this is a feature of VA. It looks like a feature of Visual Studio however I'm not able to repro with that example. The Visual Studio feature is most often seen at work in switches when typing a case statement.
Do you have 'Format after paste' enabled (VA Options | Advanced | Corrections)? If so, try disabling that to see if it makes a difference. |
|
|
dave_lf
Junior Member
15 Posts |
Posted - Sep 27 2013 : 10:50:50 AM
|
No, I didn't have that checked. I actually went through and disabled all my other extensions and addons and unchecked every single VA setting, and I still get this behavior if and only if VA is enabled. Maybe it is a built-in Visual Studio feature that VA disables or overrides when it is loaded?
I've been looking for the VS C++ text formatting options, but it seems most of them were removed from the GUI in 2012... |
Edited by - dave_lf on Sep 30 2013 09:28:26 AM |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Sep 27 2013 : 10:58:47 AM
|
What method are you using to disable Visual Assist? |
|
|
dave_lf
Junior Member
15 Posts |
Posted - Sep 27 2013 : 11:01:46 AM
|
VASSISTX > Enable/Disable Visual Assist X
Also, for what it's worth, if I select code formatted as in example one a choose EDIT > Advanced > Format Selection, Visual Studio applies this same "correction". So it seems that the VS autoformat action is being triggered for some reason when I type ::. |
Edited by - dave_lf on Sep 27 2013 11:03:08 AM |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Sep 27 2013 : 11:05:17 AM
|
When you type "NameSpace::" are you typing all of that or are you using any listbox completions? |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Sep 27 2013 : 11:07:20 AM
|
And what settings do you have in the VS Options dialog at: Text Editor | C/C++ | Tabs |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Sep 27 2013 : 11:12:10 AM
|
Ok - I was able to repro. The format does not occur if "Get content from default Intellisense" is checked in the VA Options dialog on the Advanced | Listboxes page. Investigating... |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Sep 27 2013 : 12:00:41 PM
|
Sorry for the trouble. Will be fixed in the next release. case=77157
|
|
|
dave_lf
Junior Member
15 Posts |
Posted - Sep 27 2013 : 12:03:26 PM
|
Great, thanks. And you're correct, I don't have "Get content from default Intellisense" checked. |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Nov 18 2013 : 3:05:06 PM
|
case=77157 is fixed in build 2007 |
|
|
|
Topic |
|