From 8b155960708a0ff551c5fc8ec65d2c3c6d12e1da Mon Sep 17 00:00:00 2001 From: Simon Dahlberg Date: Thu, 17 Jan 2019 22:42:12 +0200 Subject: Add config option to send or not send ESC when ALT-key is pressed --- src/event.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/event.rs') diff --git a/src/event.rs b/src/event.rs index bada4f68..5c6b71d0 100644 --- a/src/event.rs +++ b/src/event.rs @@ -293,6 +293,7 @@ pub struct Processor { pending_events: Vec, window_changes: WindowChanges, save_to_clipboard: bool, + alt_send_esc: bool, } /// Notify that the terminal was resized @@ -337,6 +338,7 @@ impl Processor { pending_events: Vec::with_capacity(4), window_changes: Default::default(), save_to_clipboard: config.selection().save_to_clipboard, + alt_send_esc: config.alt_send_esc(), } } @@ -518,6 +520,7 @@ impl Processor { key_bindings: &self.key_bindings[..], mouse_bindings: &self.mouse_bindings[..], save_to_clipboard: self.save_to_clipboard, + alt_send_esc: self.alt_send_esc, }; let mut window_is_focused = window.is_focused; @@ -573,5 +576,6 @@ impl Processor { self.mouse_bindings = config.mouse_bindings().to_vec(); self.mouse_config = config.mouse().to_owned(); self.save_to_clipboard = config.selection().save_to_clipboard; + self.alt_send_esc = config.alt_send_esc(); } } -- cgit