zed/crates/ui
Oleksiy Syvokon 7f7c21536e
ui: Don't panic on invalid highlight indices in HighlightedLabel (#57291)
HighlightedLabel would crash the application if any provided highlight
index was invalid. In theory, this should never happen. In practice,
this can happen due to race conditions at call sites.

After this change, we only panic in debug builds. In release builds, we
log an error and return a label with no highlights. The error message
includes the call site so that it's easier to fix the root cause.

Related to #57290

Part of FR-11.

Release Notes:

- N/A
2026-05-21 04:01:28 +00:00
..
src ui: Don't panic on invalid highlight indices in HighlightedLabel (#57291) 2026-05-21 04:01:28 +00:00
Cargo.toml ui: Don't panic on invalid highlight indices in HighlightedLabel (#57291) 2026-05-21 04:01:28 +00:00
LICENSE-GPL