editor: Disable selection highlights for single line editor (#26805)

Fixes the selection highlight appearing in single-line editors like the
file picker, command palette, etc.

Release Notes:

- Fixed selection highlight appearing in input fields like the file
picker, command palette, etc.
This commit is contained in:
Smit Barmase 2025-03-14 21:32:40 +00:00 committed by GitHub
parent 3ad9074e63
commit e5d2678d94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4949,6 +4949,9 @@ impl Editor {
window: &mut Window,
cx: &mut Context<Editor>,
) {
if matches!(self.mode, EditorMode::SingleLine { .. }) {
return;
}
self.selection_highlight_task.take();
if !EditorSettings::get_global(cx).selection_highlight {
self.clear_background_highlights::<SelectedTextHighlight>(cx);