mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-04-02 01:50:29 -04:00
Targeted fix for saving issue on MacOS (#9073)
* Create a targeted fix * Add sql carbon edit
This commit is contained in:
@@ -52,7 +52,7 @@ export class QueryEditorService implements IQueryEditorService {
|
|||||||
let docUri: URI = URI.from({ scheme: Schemas.untitled, path: filePath });
|
let docUri: URI = URI.from({ scheme: Schemas.untitled, path: filePath });
|
||||||
|
|
||||||
// Create a sql document pane with accoutrements
|
// Create a sql document pane with accoutrements
|
||||||
const fileInput = this._untitledEditorService.create({ associatedResource: docUri, mode: 'sql' });
|
const fileInput = this._untitledEditorService.create({ untitledResource: docUri, mode: 'sql' });
|
||||||
let untitledEditorModel = await fileInput.resolve();
|
let untitledEditorModel = await fileInput.resolve();
|
||||||
if (sqlContent) {
|
if (sqlContent) {
|
||||||
untitledEditorModel.textEditorModel.setValue(sqlContent);
|
untitledEditorModel.textEditorModel.setValue(sqlContent);
|
||||||
@@ -87,7 +87,7 @@ export class QueryEditorService implements IQueryEditorService {
|
|||||||
let docUri: URI = URI.from({ scheme: Schemas.untitled, path: filePath });
|
let docUri: URI = URI.from({ scheme: Schemas.untitled, path: filePath });
|
||||||
|
|
||||||
// Create a sql document pane with accoutrements
|
// Create a sql document pane with accoutrements
|
||||||
const fileInput = this._untitledEditorService.create({ associatedResource: docUri, mode: 'sql' });
|
const fileInput = this._untitledEditorService.create({ untitledResource: docUri, mode: 'sql' });
|
||||||
const m = await fileInput.resolve();
|
const m = await fileInput.resolve();
|
||||||
//when associatedResource editor is created it is dirty, this must be set to false to be able to detect changes to the editor.
|
//when associatedResource editor is created it is dirty, this must be set to false to be able to detect changes to the editor.
|
||||||
m.setDirty(false);
|
m.setDirty(false);
|
||||||
|
|||||||
@@ -572,7 +572,8 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Finally fallback to suggest just the file name
|
// Finally fallback to suggest just the file name
|
||||||
return toLocalResource(resource.with({ path: suggestedFilename }), remoteAuthority);
|
// {{SQL CARBON EDIT}} - Rationale: this seems to be a bug we picked up from a vscode merge. This should get fixed with a new merge in the future.
|
||||||
|
return joinPath(this.fileDialogService.defaultFilePath() || URI.file(this.environmentService.userHome), suggestedFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user