diff --git a/lapce-data/src/data.rs b/lapce-data/src/data.rs index 70a43b65..d78cfdf8 100644 --- a/lapce-data/src/data.rs +++ b/lapce-data/src/data.rs @@ -15,7 +15,9 @@ Rect, Size, Target, Vec2, WidgetId, WindowId, }; -use lapce_core::{mode::MotionMode, register::Register}; +use lapce_core::{ + command::MultiSelectionCommand, mode::MotionMode, register::Register, +}; use lapce_rpc::{ file::FileNodeItem, plugin::PluginDescription, source_control::FileDiff, terminal::TermId, @@ -1648,6 +1650,18 @@ fn show_panel(&mut self, ctx: &mut EventCtx, kind: PanelKind) { PanelKind::Search => self.search.active, PanelKind::Problem => self.problem.widget_id, }; + if let PanelKind::Search = kind { + ctx.submit_command(Command::new( + LAPCE_COMMAND, + LapceCommand { + kind: CommandKind::MultiSelection( + MultiSelectionCommand::SelectAll, + ), + data: None, + }, + Target::Widget(focus_id), + )); + } ctx.submit_command(Command::new( LAPCE_UI_COMMAND, LapceUICommand::Focus,