fix(editor): keep line-end annotations past the code with wrapped-part indent (#4463)

With soft wrap and "Use original line's indent for wrapped parts", an indented
line carries a negative text-indent. Inline widgets inherited it, so the inline
blame (and other line-end hints drawn in a block box) started that many columns
to the left, over the code. Widgets now reset text-indent.
This commit is contained in:
l0ng-ai
2026-11-19 15:49:10 +08:00
committed by GitHub
parent 1a12c88f0c
commit a83fc0f3d1
+4
View File
@@ -420,4 +420,8 @@ export const openideaTheme = EditorView.theme({
"&.cm-lineWrapping .cm-line, .cm-lineWrapping .cm-line": {
paddingRight: "calc(24px + var(--cm-corner-inset, 0px))",
},
// The wrapped-part indent is a negative `text-indent` on the line (prefs.ts). Widgets inherit
// it, and a block-level box inside one (the inline blame, a line-end hint) would start its
// text that many columns to the left, over the code.
".cm-line [contenteditable='false']": { textIndent: "0" },
});