mirror of https://github.com/lapce/lapce.git
global search select all
This commit is contained in:
parent
d5e8774bb6
commit
946452ad6e
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue