Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Auto-indentation of comma in multiline member init

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
cmartel Posted - Jan 09 2020 : 3:04:36 PM
Minor but irritating bug: When typing in class member initialization lists over multiple lines and starting each line with a comma, the comma gets incorrectly auto-indented to the beginning of the line.



Result:
class Potato
{
    Potato()
        : _spud(0.0f)
,        _tots(42)
    {
    }

    float _spud;
    int _tots;
};

Expected result:
class Potato
{
    Potato()
        : _spud(0.0f)
        , _tots(42)
    {
    }

    float _spud;
    int _tots;
};

This started happening in the last 1-2-ish updates of VAX, using VS2019. I'm about certain it's VAX related as disabling it makes the issue go away.
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 19 2020 : 06:28:10 AM
Thank you for the update, and I am glad this is now fixed for you.
cmartel Posted - Aug 18 2020 : 6:25:31 PM
Apologies for the very late reply, I hadn't looked back here and/or didn't receive a notification for it...

I can confirm that with a VS2019 update (and possibly VAX too), this no longer occurs. I didn't write down the VS2019/VAX versions I was on back then, but considering updating has fixed the issue, it might as well be resolved.
feline Posted - Jan 10 2020 : 1:11:08 PM
Thank you for the clear gif of the problem. First a silly question, does this happen every time, on demand? It looks like it from the video, and your description sounds like it.

Does this happen in all files, or is it somehow file or solution specific? I am wondering if there could be a solution specific code formatting file at work that is a factor here somehow.

I have just tried this on two different systems, one is a clean install of VA, and one is my normal test system, and neither of them show this problem. So it is probably dependent on specific settings.

Normally VA does not do formatting of your code, so I would suspect the IDE code formatting settings, but since disabling VA stops this from happening, clearly VA is important.

Can you please export your VA and IDE settings and send them to me:

VA Options -> Performance -> Export Settings
IDE tools menu -> Import and Export Settings -> Export selected environment settings

If you email me via [email protected] and just attach the settings files I can see if they are enough to trigger the problem here.

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