mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 17:48:56 +01:00
Prevent multiple cell status bar items (#185621)
* Stop running Throttler after class is disposed Fix microsoft/vscode-jupyter#13537 * Clean up item ID cache * Add comment
This commit is contained in:
@@ -742,6 +742,8 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD
|
||||
const cell = this.getCellByHandle(itemDelta.handle);
|
||||
const deleted = deletesByHandle[itemDelta.handle] ?? [];
|
||||
delete deletesByHandle[itemDelta.handle];
|
||||
deleted.forEach(id => this._statusBarItemIdToCellMap.delete(id));
|
||||
|
||||
const ret = cell?.deltaCellStatusBarItems(deleted, itemDelta.items) || [];
|
||||
ret.forEach(id => {
|
||||
this._statusBarItemIdToCellMap.set(id, itemDelta.handle);
|
||||
@@ -755,6 +757,7 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD
|
||||
const ids = deletesByHandle[handle];
|
||||
const cell = this.getCellByHandle(handle);
|
||||
cell?.deltaCellStatusBarItems(ids, []);
|
||||
ids.forEach(id => this._statusBarItemIdToCellMap.delete(id));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user