emit height change event when discard/accept edits (#227079)

fixes https://github.com/microsoft/vscode-copilot/issues/6938
pull/227084/head
Johannes Rieken 2024-08-29 16:16:26 +02:00 committed by GitHub
parent be0639a60e
commit 79c48eaf5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 5 deletions

View File

@ -770,15 +770,11 @@ export class CodeCompareBlockPart extends Disposable {
});
dom.reset(this.messageElement, message);
}
const diffData = await data.diffData;
if (!diffData) {
return;
}
if (!isEditApplied) {
if (!isEditApplied && diffData) {
const viewModel = this.diffEditor.createViewModel({
original: diffData.original,
modified: diffData.modified
@ -801,6 +797,7 @@ export class CodeCompareBlockPart extends Disposable {
} else {
this.diffEditor.setModel(null);
this._lastDiffEditorViewModel.value = undefined;
this._onDidChangeContentHeight.fire();
}
this.toolbar.context = {