Skip to content

Commit 7a135a6

Browse files
committed
Prevent ligatures between inlay hints and editor contents (Fix microsoft#170449)
https://www.w3.org/TR/2023/CRD-css-text-3-20230213/#boundary-shaping
1 parent cd95e93 commit 7a135a6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/vs/editor/browser/editorDom.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ export interface CssProperties {
342342
fontWeight?: string;
343343
fontSize?: string;
344344
fontFamily?: string;
345+
unicodeBidi?: string;
345346
textDecoration?: string;
346347
color?: string | ThemeColor;
347348
backgroundColor?: string | ThemeColor;

src/vs/editor/contrib/inlayHints/browser/inlayHintsController.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ export class InlayHintsController implements IEditorContribution {
495495
fontSize: `${fontSize}px`,
496496
fontFamily: `var(${fontFamilyVar}), ${EDITOR_FONT_DEFAULTS.fontFamily}`,
497497
verticalAlign: isUniform ? 'baseline' : 'middle',
498+
unicodeBidi: 'isolate'
498499
};
499500

500501
if (isNonEmptyArray(item.hint.textEdits)) {

0 commit comments

Comments
 (0)