Skip to content

Commit

Permalink
Rebase against the upstream 11ad426
Browse files Browse the repository at this point in the history
vscode-upstream-sha1: 11ad426
  • Loading branch information
Eclipse Che Sync committed Aug 30, 2024
2 parents 5d993cc + 11ad426 commit 5648428
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ export class DeletedElement extends SingleSideDiffElement {

layout(state: IDiffElementLayoutState) {
DOM.scheduleAtNextAnimationFrame(DOM.getWindow(this._diffEditorContainer), () => {
if (state.editorHeight || state.outerWidth) {
if ((state.editorHeight || state.outerWidth) && this._editor) {
this._editorContainer.style.height = `${this.cell.layoutInfo.editorHeight}px`;
this._editor.layout({
width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, false),
Expand Down Expand Up @@ -1254,7 +1254,7 @@ export class InsertElement extends SingleSideDiffElement {

layout(state: IDiffElementLayoutState) {
DOM.scheduleAtNextAnimationFrame(DOM.getWindow(this._diffEditorContainer), () => {
if (state.editorHeight || state.outerWidth) {
if ((state.editorHeight || state.outerWidth) && this._editor) {
this._editorContainer.style.height = `${this.cell.layoutInfo.editorHeight}px`;
this._editor.layout({
width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export abstract class DiffElementCellViewModelBase extends DiffElementViewModelB
layoutState: CellLayoutState.Uninitialized
};

this.cellFoldingState = modified?.textModel?.getValue() !== original?.textModel?.getValue() ? PropertyFoldingState.Expanded : PropertyFoldingState.Collapsed;
this.cellFoldingState = modified?.getTextBufferHash() !== original?.getTextBufferHash() ? PropertyFoldingState.Expanded : PropertyFoldingState.Collapsed;
this.metadataFoldingState = PropertyFoldingState.Collapsed;
this.outputFoldingState = PropertyFoldingState.Collapsed;

Expand Down

0 comments on commit 5648428

Please sign in to comment.