From 39655269c3284e89349a27ff8b02c19fc43df8c6 Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Sat, 16 Oct 2021 20:48:18 +0200 Subject: [PATCH] fix(core): disable undo_backspace when using slow inject mode on linux --- espanso/src/cli/worker/config.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/espanso/src/cli/worker/config.rs b/espanso/src/cli/worker/config.rs index c4808bb..408782a 100644 --- a/espanso/src/cli/worker/config.rs +++ b/espanso/src/cli/worker/config.rs @@ -168,6 +168,13 @@ impl<'a> espanso_engine::process::UndoEnabledProvider for ConfigManager<'a> { return false; } + // Because we cannot filter out espanso-generated events when using the X11 record injection + // method, we need to disable undo_backspace to avoid looping (espanso picks up its own + // injections, causing the program to misbehave) + if cfg!(target_os = "linux") && self.active().disable_x11_fast_inject() { + return false; + } + self.active().undo_backspace() } }