Skip to content

Commit 97ff3e5

Browse files
authored
Prevent NES flickering when switching tab actions (microsoft#238133)
fixes microsoft/vscode-copilot#11743
1 parent ed96529 commit 97ff3e5

File tree

1 file changed

+6
-1
lines changed
  • src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits

1 file changed

+6
-1
lines changed

src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ export class InlineEditsView extends Disposable {
8181
)!;
8282

8383
this._previewTextModel.setLanguage(this._editor.getModel()!.getLanguageId());
84-
this._previewTextModel.setValue(newText);
84+
85+
const previousNewText = this._previewTextModel.getValue();
86+
if (previousNewText !== newText) {
87+
// Only update the model if the text has changed to avoid flickering
88+
this._previewTextModel.setValue(newText);
89+
}
8590

8691
return {
8792
state,

0 commit comments

Comments
 (0)