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-15 03:02:40 +05:30
committed by GitHub
parent 3ad9074e63
commit e5d2678d94
+3
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);