Send correct character sequence with alt key

Resolves #46.
This commit is contained in:
Joe Wilm 2017-01-02 23:47:56 -08:00
parent 38a9673eb3
commit 79d13c736e
1 changed files with 6 additions and 1 deletions

View File

@ -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();
}