mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-19 18:46:52 -05: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 });
|
||||
|
||||
// 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();
|
||||
if (sqlContent) {
|
||||
untitledEditorModel.textEditorModel.setValue(sqlContent);
|
||||
@@ -87,7 +87,7 @@ export class QueryEditorService implements IQueryEditorService {
|
||||
let docUri: URI = URI.from({ scheme: Schemas.untitled, path: filePath });
|
||||
|
||||
// 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();
|
||||
//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);
|
||||
|
||||
@@ -572,7 +572,8 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
|
||||
}
|
||||
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user