Skip to content

Commit fb031d4

Browse files
authored
Merge pull request microsoft#188514 from microsoft/aamunger/toggleScrollFix
bump version on metadata change
2 parents fbbbb55 + b45ea5f commit fb031d4

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ registerAction2(class ToggleCellOutputScrolling extends NotebookMultiCellAction
617617
const currentlyEnabled = cellMetadata['scrollable'] !== undefined ? cellMetadata['scrollable'] : globalScrollSetting;
618618
const shouldEnableScrolling = collapsed || !currentlyEnabled;
619619
cellMetadata['scrollable'] = shouldEnableScrolling;
620+
viewModel.model.bumpVersion();
620621
viewModel.resetRenderer();
621622
}
622623
}

src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,8 @@ export class NotebookCellOutputTextModel extends Disposable implements ICellOutp
118118
};
119119
}
120120

121+
bumpVersion() {
122+
this._versionId = this._versionId + 1;
123+
}
121124

122125
}

src/vs/workbench/contrib/notebook/common/notebookCommon.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ export interface ICellOutput {
218218
replaceData(items: IOutputDto): void;
219219
appendData(items: IOutputItemDto[]): void;
220220
appendedSinceVersion(versionId: number, mime: string): VSBuffer | undefined;
221+
bumpVersion(): void;
221222
}
222223

223224
export interface CellInternalMetadataChangedEvent {

0 commit comments

Comments
 (0)