Restore clipboard to its pre-trigger state before evaluating passive match

Fixes #365
This commit is contained in:
Andy Kluger 2020-07-13 13:39:24 -04:00
parent 45bcaee54b
commit c3c3908e1e

View File

@ -366,6 +366,7 @@ impl<
info!("Avoiding passive expansion, as the user didn't select anything"); info!("Avoiding passive expansion, as the user didn't select anything");
} else { } else {
if let Some(previous_content) = previous_clipboard { if let Some(previous_content) = previous_clipboard {
self.clipboard_manager.set_clipboard(&previous_content);
// Because of issue #213, we need to make sure the user selected something. // Because of issue #213, we need to make sure the user selected something.
if clipboard == previous_content { if clipboard == previous_content {
info!("Avoiding passive expansion, as the user didn't select anything"); info!("Avoiding passive expansion, as the user didn't select anything");