ui: Fix panic in `highlight_ranges` when given an oob index (#39051)

Fixes ZED-1QW

Release Notes:

- Fixed a panic when highlighting labels
5ce7eda8d2Lukas Wirth committed on 9/28/2025, 11:54:18 AM· committed by GitHubparent6d7a4c4
1 file changedLine totals unavailable