feat(core): wire up undo feature

This commit is contained in:
Federico Terzi 2021-08-15 11:10:31 +02:00
parent fb45f92b69
commit 7439cc1081
3 changed files with 9 additions and 1 deletions

View File

@ -160,3 +160,9 @@ impl<'a> espanso_engine::process::MatcherMiddlewareConfigProvider for ConfigMana
self.default().backspace_limit() self.default().backspace_limit()
} }
} }
impl<'a> espanso_engine::process::UndoEnabledProvider for ConfigManager<'a> {
fn is_undo_enabled(&self) -> bool {
self.active().undo_backspace()
}
}

View File

@ -188,6 +188,7 @@ pub fn initialize_and_spawn(
disable_options, disable_options,
&config_manager, &config_manager,
&combined_match_cache, &combined_match_cache,
&config_manager,
); );
let event_injector = EventInjectorAdapter::new(&*injector, &config_manager); let event_injector = EventInjectorAdapter::new(&*injector, &config_manager);

View File

@ -45,5 +45,6 @@ generate_patchable_config!(
word_separators -> Vec<String>, word_separators -> Vec<String>,
backspace_limit -> usize, backspace_limit -> usize,
apply_patch -> bool, apply_patch -> bool,
undo_backspace -> bool,
keyboard_layout -> Option<RMLVOConfig> keyboard_layout -> Option<RMLVOConfig>
); );