Skip to content

Commit

Permalink
Prevent NES flickering when switching tab actions (#238133)
Browse files Browse the repository at this point in the history
  • Loading branch information
benibenj authored Jan 17, 2025
1 parent ed96529 commit 97ff3e5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ export class InlineEditsView extends Disposable {
)!;

this._previewTextModel.setLanguage(this._editor.getModel()!.getLanguageId());
this._previewTextModel.setValue(newText);

const previousNewText = this._previewTextModel.getValue();
if (previousNewText !== newText) {
// Only update the model if the text has changed to avoid flickering
this._previewTextModel.setValue(newText);
}

return {
state,
Expand Down

0 comments on commit 97ff3e5

Please sign in to comment.