SIGN IN SIGN UP

highlighter: Preserve text color without syntax highlighting (#2570)

Related to #2325

## Description

When the `tree-sitter` feature is disabled, the stub implementation of
`SyntaxHighlighter::styles` returns an empty style list.

The input renderer builds text runs from that list. When the list is
empty, no colored text run is created, so GPUI paints the text with its
default black instead of preserving the input's text color.

The native highlighter returns the requested range with
`HighlightStyle::default()` when no styles match. This change aligns the
stub implementation with that behavior so the input text color is
preserved when syntax highlighting is disabled.

## How to Test

- Run `cargo check -p gpui-component --target wasm32-unknown-unknown
--lib`.
- Build a web application that uses gpui-component with
`default-features = false`.
- Enter text in a CodeEditor with a dark theme.
- Verify that existing and newly entered text use the input's text
color.

## Checklist

- [x] I have read the [CONTRIBUTING](../CONTRIBUTING.md) document and
followed the guidelines.
- [x] Reviewed the changes in this PR and confirmed AI generated code
(if any) is accurate.
- [N/A] Passed `cargo run` for story tests related to the changes.
- [N/A] Tested macOS, Windows and Linux platforms performance (not
platform-specific).
M
MuNeNiCK committed
f03f371332b303d5e269c479f02d7e22c44c7481
Parent: 3de68cd
Committed by GitHub <noreply@github.com> on 7/15/2026, 6:34:10 AM