mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix Notebook Viewlet Highlighting (#10868)
* Stop double tree data provider registrations * revert book finding logic, leverage currentBook
This commit is contained in:
@@ -232,12 +232,10 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
|
||||
if (!uri) {
|
||||
let openDocument = azdata.nb.activeNotebookEditor;
|
||||
if (openDocument) {
|
||||
let book = this.books.find(b => openDocument.document.uri.fsPath.replace(/\\/g, '/').toLowerCase().indexOf(b.bookPath.toLowerCase()) > -1);
|
||||
bookItem = book?.getNotebook(openDocument.document.uri.fsPath);
|
||||
bookItem = this.currentBook?.getNotebook(openDocument.document.uri.fsPath);
|
||||
}
|
||||
} else if (uri.fsPath) {
|
||||
let book = this.books.find(b => uri.fsPath.replace(/\\/g, '/').toLowerCase().indexOf(b.bookPath.toLowerCase()) > -1);
|
||||
bookItem = book?.getNotebook(uri.fsPath);
|
||||
bookItem = this.currentBook?.getNotebook(uri.fsPath);
|
||||
}
|
||||
if (bookItem) {
|
||||
// Select + focus item in viewlet if books viewlet is already open, or if we pass in variable
|
||||
|
||||
Reference in New Issue
Block a user