mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 09:35:38 -05:00
Don't prompt for save when JSON column untitled file is closed (version 2) (#17327)
* Stops flagging untitled editors with pre-loaded content as dirty * Code changes address broken unit tests. * Completes original comment * Defines new non dirty text editor model * Revert "Completes original comment" This reverts commit 6d0e90bb9f0650eead5a0ec1ca8524dfe96c56cd. * Revert "Code changes address broken unit tests." This reverts commit 5b8cdd9f0bb43638bdd427a454ea177f6fbc024d. * Revert "Stops flagging untitled editors with pre-loaded content as dirty" This reverts commit 7a39226b7961af3aba8dc2f08113ed09eb2a1d61. * Stops marking untitled editors with JSON as dirty * Code clean up.
This commit is contained in:
@@ -694,6 +694,8 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
|
||||
const input = this.untitledEditorService.create({ mode: column.isXml ? 'xml' : 'json', initialValue: content });
|
||||
await input.resolve();
|
||||
await this.instantiationService.invokeFunction(formatDocumentWithSelectedProvider, input.textEditorModel, FormattingMode.Explicit, Progress.None, CancellationToken.None);
|
||||
input.setDirty(false);
|
||||
|
||||
return this.editorService.openEditor(input);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user