Commit 8680ec3
fix(editor): align selection highlight — integer line-height
The editor overlays a <textarea> on a highlight <pre>. With a fractional line
box (line-height 1.7 * 13px = 22.1px) the textarea's internal text layout and
the block <pre> rounded lines differently, so the native selection drifted
upward from the painted glyphs, growing with line number (visible by ~line 37).
Use an integer px line-height (22px) on .sql-editor so both lay out lines
identically before `zoom: 1.2` scales them together, and match .sql-gutter > div
height so the line numbers stay row-aligned. Verified in-browser: selection on a
deep line now brackets the glyphs exactly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef1 parent 65a6d08 commit 8680ec3
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
536 | 541 | | |
537 | 542 | | |
538 | 543 | | |
| |||
546 | 551 | | |
547 | 552 | | |
548 | 553 | | |
549 | | - | |
| 554 | + | |
550 | 555 | | |
551 | 556 | | |
552 | 557 | | |
| |||
0 commit comments