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 authored and GitHub committed 2025-03-15 03:02:40 +05:30
1 parent 135a3f3ace
commit 3eca1ebeb1
1 file changed
+3
+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);