Skip to content

Commit 22e246d

Browse files
committed
Fixes microsoft#146042 by only enabling cursor stops left to ghost text.
1 parent 66d1e5d commit 22e246d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { LineTokens } from 'vs/editor/common/tokens/lineTokens';
1414
import { Position } from 'vs/editor/common/core/position';
1515
import { Range } from 'vs/editor/common/core/range';
1616
import { createStringBuilder } from 'vs/editor/common/core/stringBuilder';
17-
import { IModelDeltaDecoration, PositionAffinity } from 'vs/editor/common/model';
17+
import { IModelDeltaDecoration, InjectedTextCursorStops, PositionAffinity } from 'vs/editor/common/model';
1818
import { ILanguageIdCodec } from 'vs/editor/common/languages';
1919
import { ILanguageService } from 'vs/editor/common/languages/language';
2020
import { ghostTextBackground, ghostTextBorder, ghostTextForeground } from 'vs/editor/common/core/editorColorRegistry';
@@ -262,7 +262,7 @@ class DecorationsWidget implements IDisposable {
262262
range: Range.fromPositions(new Position(lineNumber, hiddenText.column), new Position(lineNumber, hiddenText.column + hiddenText.length)),
263263
options: {
264264
inlineClassName: 'ghost-text-hidden',
265-
description: 'ghost-text-hidden'
265+
description: 'ghost-text-hidden',
266266
}
267267
});
268268
}
@@ -272,7 +272,7 @@ class DecorationsWidget implements IDisposable {
272272
range: Range.fromPositions(new Position(lineNumber, p.column)),
273273
options: {
274274
description: 'ghost-text',
275-
after: { content: p.text, inlineClassName: p.preview ? 'ghost-text-decoration-preview' : 'ghost-text-decoration' },
275+
after: { content: p.text, inlineClassName: p.preview ? 'ghost-text-decoration-preview' : 'ghost-text-decoration', cursorStops: InjectedTextCursorStops.Left },
276276
showIfCollapsed: true,
277277
}
278278
});

0 commit comments

Comments
 (0)