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
 C++: Autoindentation of multiline func definitions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dave_lf
Junior Member

15 Posts

Posted - Sep 26 2013 :  12:31:47 PM  Show Profile  Reply with Quote
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  Show Profile  Reply with Quote
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
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 26 2013 :  7:25:03 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

dave_lf
Junior Member

15 Posts

Posted - Sep 27 2013 :  10:50:50 AM  Show Profile  Reply with Quote
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
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 27 2013 :  10:58:47 AM  Show Profile  Reply with Quote
What method are you using to disable Visual Assist?
Go to Top of Page

dave_lf
Junior Member

15 Posts

Posted - Sep 27 2013 :  11:01:46 AM  Show Profile  Reply with Quote
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
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 27 2013 :  11:05:17 AM  Show Profile  Reply with Quote
When you type "NameSpace::" are you typing all of that or are you using any listbox completions?
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 27 2013 :  11:07:20 AM  Show Profile  Reply with Quote
And what settings do you have in the VS Options dialog at:
Text Editor | C/C++ | Tabs
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 27 2013 :  11:12:10 AM  Show Profile  Reply with Quote
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...
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 27 2013 :  12:00:41 PM  Show Profile  Reply with Quote
Sorry for the trouble. Will be fixed in the next release. case=77157
Go to Top of Page

dave_lf
Junior Member

15 Posts

Posted - Sep 27 2013 :  12:03:26 PM  Show Profile  Reply with Quote
Great, thanks. And you're correct, I don't have "Get content from default Intellisense" checked.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 18 2013 :  3:05:06 PM  Show Profile  Reply with Quote
case=77157 is fixed in build 2007
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