Selecting all text and typing left an extra empty line at the end: always for files without a final newline, and for files with one when the browser took more than 50 ms to apply the edit (the intermittent e2e/cornerInset.spec.ts failure). @codemirror/view 6.44's DOMReader read a line break after the only remaining line because its stale tile still had breakAfter set. The patch applies CodeMirror's upstream fix (view commit 45438ff87c), which only adds the break when content follows, until a release includes it.
Co-authored-by: audichuang <[email protected]>
Fast mouse drags could hit-test, redraw the selection and recalculate edge scrolling several times before the editor painted a frame. The first move now responds immediately, later moves in the same frame share one update, and releasing the button applies the last pending position (patch to @codemirror/view).
@codemirror/view 6.44 contains the upstream fix for tooltip positioning in Safari/WebKit; bump to ^6.44.2 and rebase the local patch onto it.
Co-authored-by: nntndfrk <[email protected]>
Extending a selection with Shift+Down over long unwrapped lines got slower with every selected line: while scrolling the head into view, CodeMirror placed each long line's rendered part by the target's fraction of that line (1 above the target, negative below it), so every long line above the caret was redrawn from its end and back. The @codemirror/view patch now centres every unwrapped line's line gaps on the target's x, taken from the target's own line; wrapped lines are unchanged.
Adds selectLongLinesSql/Txt perf scenarios, SQL to the in-memory backend's languages, and a jsdom test for the line gaps.
Refs #4658
Co-authored-by: audichuang <[email protected]>
Removes selectors that restyled whole subtrees on every inserted editor line or focus change (CodeMirror via a pnpm patch; selectorCost.test.ts guards them), measures space width once per font, shares one tooltip host, builds tab menus lazily, caches parsed SVG icons, prewarms an off-screen editor at idle, stats project-tree entries in parallel, and keeps the Git tool window at its size during a live window resize. Verified with full vitest, typecheck, ide-vfs cargo test and clippy, gitLog e2e, and a window resize in the app.