Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 BUG: .editorconfig when refactoring closed docs

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 - Aug 18 2020 : 6:21:33 PM
Environment
Microsoft Visual Studio Community 2019
Version 16.6.3
VisualStudio.16.Release/16.6.3+30225.117
Visual Assist 10.9.2353.0

Visual Studio's Text Editor settings for C/C++ > Tabs is set to "Keep Tabs". The project has an .editorconfig overriding this through indent_style = space.

Repro steps
1. Open the .h file (and only that) from C++ header/cpp pair.
2. Add a function declaration (or anything that'll allow a Refactor snippet) to the .h file.
3. From VAX's Quick Actions and Refactorings, choose "Create Implementation".

Result: The corresponding .cpp is opened and the Refactor snippet is inserted, but using tabs instead of spaces.
Expected result: The snippet is inserted with spaces as per the .editorconfig override.

Do note that if the .cpp document is already open, refactoring will correctly use spaces instead of tabs. Likewise, if the C/C++ setting is set to spaces instead of tabs, it'll insert spaces even after automatically opening the document.

I'm not sure if this is a VAX or a VS issue as I don't recall noticing this behaviour before I updated VS2019 sometime in the last month, but because it involves VAX refactoring, I figured I'd let you know.

Thanks again for VAX and keep up the good work! :)
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 19 2020 : 10:36:21 AM
I am seeing the same effect here.

case=142807

If it helps, after running Create Implementation the generated code is still selected, so you can use the IDE format selection command, CTRL-K, CTRL-F by default, to reformat the code according to the .editorconfig settings. Not ideal, but this should help a bit when you notice this happening.

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