mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 08:03:19 +00:00
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:
@@ -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" },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user