From 79d13c736e5d5b0c85f1387399ab40195ed2d4a8 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Mon, 2 Jan 2017 23:47:56 -0800 Subject: Send correct character sequence with alt key Resolves #46. --- src/input.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/input.rs b/src/input.rs index 3b23c0c7..f2bd461b 100644 --- a/src/input.rs +++ b/src/input.rs @@ -365,7 +365,12 @@ impl<'a, N: Notify + 'a> Processor<'a, N> { } // Didn't process a binding; print the provided character - if let Some(string) = string { + if let Some(mut string) = string { + // from ST + if string.len() == 1 && mods.contains(mods::ALT) { + string.insert(0, '\x1b'); + } + self.ctx.notifier.notify(string.into_bytes()); self.ctx.selection.clear(); } -- cgit