Skip to content

Commit 404a314

Browse files
committed
Don't prepare ghost text if using injected text.
1 parent 52a80f8 commit 404a314

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/editor/contrib/inlineCompletions/ghostTextWidget.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ class DecorationsWidget implements IDisposable {
264264
lastIndex = p.column - 1;
265265

266266
// To avoid visual confusion, we don't want to render visible whitespace
267-
const contentText = this.renderSingleLineText(p.text, currentLinePrefix, tabSize, false);
267+
const contentText = shouldUseInjectedText ? p.text : this.renderSingleLineText(p.text, currentLinePrefix, tabSize, false);
268268

269269
const decorationType = this.disposableStore.add(registerDecorationType(this.codeEditorService, 'ghost-text', '0-ghost-text-', {
270270
after: {

0 commit comments

Comments
 (0)