Cancel code actions when focus is lost

This commit is contained in:
Dániel Buga 2022-03-26 10:58:01 +01:00
parent d9b0492267
commit 9a80a5bf93
1 changed files with 9 additions and 2 deletions

View File

@ -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(