Skip to content

Commit d83b577

Browse files
committed
livePreview - don't show diff when populating just an empty file
1 parent 2f16bb6 commit d83b577

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/interactiveEditor/browser/interactiveEditorLivePreviewWidget.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ export class InteractiveEditorLivePreviewWidget extends ZoneWidget {
148148
private _updateFromChanges(range: Range, changes: LineRangeMapping[]): void {
149149
assertType(this.editor.hasModel());
150150

151-
if (changes.length === 0) {
152-
// no change
151+
if (changes.length === 0 || this._textModelv0.getValueLength() === 0) {
152+
// no change or changes to an empty file
153153
this._logService.debug('[IE] livePreview-mode: no diff');
154154
this.hide();
155155

0 commit comments

Comments
 (0)