gpui: Further fix extraction of font runs from text runs (#43856)

After #39928, if a font's weight changes between text runs without other
decoration changing, the earlier weight continues to be used for the
subsequent run(s).

PR #40840 fixes this in shape_text, but similar code exists also in
layout_text. The latter is used for text in the editor view itself, so
the issue continues to appear when using a highlighting theme with
varied font weights.

Fix the issue by applying the same fix in layout_text.

Closes #42297

Release Notes:

- Fixed incorrect font weights in editor view when using a highlighting
theme with varying font weights
d1d419b209Mikko Perttunen committed on 12/1/2025, 7:54:47 AM· committed by GitHubparent2e00f40
1 file changedLine totals unavailable