editor: Only compute word-diff highlights for visible rows (#58639)

Word diffs are stored per-hunk for the entire hunk range, but
layout_word_diff_highlights converted every word diff of every hunk
touching the viewport to display points each frame, even for the
off-screen portion of a large, partially-visible hunk. Each conversion
walks the inlay/fold/tab/wrap/block trees, so scrolling through a large
modified hunk (especially in split diff mode, where both editors lay out
every frame) caused frame drops proportional to the hunk's total size
rather than its visible portion.

Filter word diffs by the visible buffer-offset window before converting.
Buffer offset to display point is order-preserving, so this is
equivalent to the existing per-row filtering applied to the converted
ranges.

Release Notes:

- Improved scrolling performance in diff views containing large hunks
with many computed word diffs
86effffd34Lukas Wirth committed on 6/5/2026, 12:51:02 PM· committed by GitHubparentd11d7c8
1 file changedLine totals unavailable