mirror of https://github.com/lapce/lapce.git
Cancel code actions when focus is lost
This commit is contained in:
parent
d9b0492267
commit
9a80a5bf93
|
@ -253,11 +253,18 @@ fn event(
|
|||
|
||||
fn lifecycle(
|
||||
&mut self,
|
||||
_ctx: &mut LifeCycleCtx,
|
||||
_event: &LifeCycle,
|
||||
ctx: &mut LifeCycleCtx,
|
||||
event: &LifeCycle,
|
||||
_data: &LapceTabData,
|
||||
_env: &Env,
|
||||
) {
|
||||
if let LifeCycle::FocusChanged(false) = event {
|
||||
ctx.submit_command(Command::new(
|
||||
LAPCE_UI_COMMAND,
|
||||
LapceUICommand::CancelCodeActions,
|
||||
Target::Auto,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
fn update(
|
||||
|
|
Loading…
Reference in New Issue