From e5d2678d94ba486b538f500a46650f189ed563fe Mon Sep 17 00:00:00 2001 From: Smit Barmase Date: Fri, 14 Mar 2025 21:32:40 +0000 Subject: [PATCH] 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. --- crates/editor/src/editor.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 809a286fb8e3899db9a14443d84c8a80da5aba1e..94d3ac4383aaa97d5a2e44b7689f6a860f3108fe 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -4949,6 +4949,9 @@ impl Editor { window: &mut Window, cx: &mut Context, ) { + if matches!(self.mode, EditorMode::SingleLine { .. }) { + return; + } self.selection_highlight_task.take(); if !EditorSettings::get_global(cx).selection_highlight { self.clear_background_highlights::(cx);