This PR improves YAML syntax highlighting, selection rendering, and
search decorations across nested structures, multiline content, and
differently styled tokens.
Issues and fixes:
- YAML tokens in nested structures were not always classified correctly,
causing inconsistent syntax highlighting. The token classification logic
was refined to handle nested structures more reliably.
- Selection highlighting could render incorrectly across multiline
content and differently styled tokens. Selection rendering was updated
to preserve consistent highlighting in these cases.
- Search decorations could become misaligned with highlighted text.
Search marker alignment was corrected so decorations match the
corresponding content.
- Scrollbar markers did not always accurately reflect search results.
Scrollbar marker handling was improved to keep markers synchronized with
search decorations.
- Decoration layers could overlap or render in the wrong order.
Decoration layering was adjusted to ensure selection and search
decorations are displayed correctly.
The default CodeMirror search & replace bar in the File Editor was
unstyled, pushed the editor code down when opened, used mismatched
fonts/colors, and had a broken Replace collapse toggle.
### Changes
- Replaced the default search panel with a compact, floating top-right
widget (VS Code style) that doesn't shift editor content.
- Applied panel theme variables for backgrounds, inputs
(`var(--input)`), borders (`var(--border)`), primary buttons
(`var(--primary)`), and a danger close button (`var(--destructive)`).
- Set all widget inputs and buttons to use the theme font
(`var(--font-sans)`).
- Change the Replace section so it stays hidden by default and properly
collapses/expands on chevron click or `Ctrl+H`.
The focus ring was an outline on .cm-editor with a negative offset. The
scroller and the sticky gutters are positioned, so they painted over it:
the active line hid the ring on the right and the line numbers hid it on
the left. Draw the ring on a ::after layer above them instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>