File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Extension/src/LanguageServer Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -3608,6 +3608,15 @@ export class DefaultClient implements Client {
36083608 return ;
36093609 }
36103610
3611+ if ( headerFormatUriAndRanges . length > 0 ) {
3612+ // The header needs to be open and shown or the formatting will fail
3613+ // (due to issues/requirements in the cpptools process).
3614+ // It also seems strange and undesirable to have the header modified
3615+ // without being opened because otherwise users may not realize that
3616+ // the header had changed (unless they view source control differences).
3617+ await vscode . window . showTextDocument ( headerFormatUriAndRanges [ 0 ] . uri , { preserveFocus : true } ) ;
3618+ }
3619+
36113620 // Apply the extract to function text edits.
36123621 await vscode . workspace . applyEdit ( workspaceEdits , { isRefactoring : true } ) ;
36133622
You can’t perform that action at this time.
0 commit comments