Skip to content

Commit 5caf5ae

Browse files
committed
focusMode should track whether the cell "should" have focus, not whether it "does" have focus, and so triggering a change event when the value didn't actually change is ok
Fix microsoft#100458
1 parent 9b620b2 commit 5caf5ae

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,8 @@ export abstract class BaseCellViewModel extends Disposable {
7575
return this._focusMode;
7676
}
7777
set focusMode(newMode: CellFocusMode) {
78-
const changed = this._focusMode !== newMode;
7978
this._focusMode = newMode;
80-
81-
if (changed) {
82-
this._onDidChangeState.fire({ focusModeChanged: true });
83-
}
79+
this._onDidChangeState.fire({ focusModeChanged: true });
8480
}
8581

8682
protected _textEditor?: ICodeEditor;

0 commit comments

Comments
 (0)