mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
highlight correct notebook on navigation. (#10807)
* highlight correct notebook on navigation. * add back behavior of highight on viewlet visible * optimize bookViewer create * createTreeView for every book
This commit is contained in:
@@ -51,7 +51,7 @@ export class BookModel implements azdata.nb.NavigationProvider {
|
||||
}
|
||||
|
||||
public getNotebook(uri: string): BookTreeItem | undefined {
|
||||
return this._allNotebooks.get(uri);
|
||||
return this._allNotebooks.get(this.openAsUntitled ? path.basename(uri) : uri);
|
||||
}
|
||||
|
||||
public async loadTableOfContentFiles(folderPath: string): Promise<void> {
|
||||
@@ -190,8 +190,8 @@ export class BookModel implements azdata.nb.NavigationProvider {
|
||||
if (this.openAsUntitled) {
|
||||
if (!this._allNotebooks.get(path.basename(pathToNotebook))) {
|
||||
this._allNotebooks.set(path.basename(pathToNotebook), notebook);
|
||||
notebooks.push(notebook);
|
||||
}
|
||||
notebooks.push(notebook);
|
||||
} else {
|
||||
// convert to URI to avoid casing issue with drive letters when getting navigation links
|
||||
let uriToNotebook: vscode.Uri = vscode.Uri.file(pathToNotebook);
|
||||
|
||||
Reference in New Issue
Block a user