mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Book/untitled file name updates (#8579)
* file-name has entire path as name, changes to address that * await promises
This commit is contained in:
@@ -211,8 +211,8 @@ export class BookModel implements azdata.nb.NavigationProvider {
|
||||
if (notebook) {
|
||||
result = {
|
||||
hasNavigation: true,
|
||||
previous: notebook.previousUri ? this.openAsUntitled ? this.getPlatformSpecificUri(notebook.previousUri) : vscode.Uri.file(notebook.previousUri) : undefined,
|
||||
next: notebook.nextUri ? this.openAsUntitled ? this.getPlatformSpecificUri(notebook.nextUri) : vscode.Uri.file(notebook.nextUri) : undefined
|
||||
previous: notebook.previousUri ? this.openAsUntitled ? this.getUntitledUri(notebook.previousUri) : vscode.Uri.file(notebook.previousUri) : undefined,
|
||||
next: notebook.nextUri ? this.openAsUntitled ? this.getUntitledUri(notebook.nextUri) : vscode.Uri.file(notebook.nextUri) : undefined
|
||||
};
|
||||
} else {
|
||||
result = {
|
||||
@@ -224,12 +224,7 @@ export class BookModel implements azdata.nb.NavigationProvider {
|
||||
return Promise.resolve(result);
|
||||
}
|
||||
|
||||
getPlatformSpecificUri(resource: string): vscode.Uri {
|
||||
if (process.platform === 'win32') {
|
||||
return vscode.Uri.parse(`untitled:${resource}`);
|
||||
}
|
||||
else {
|
||||
return vscode.Uri.parse(resource).with({ scheme: 'untitled' });
|
||||
}
|
||||
getUntitledUri(resource: string): vscode.Uri {
|
||||
return vscode.Uri.parse(`untitled:${resource}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user