aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/input.rs8
2 files changed, 5 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8ef9fcc4..7ae5f202 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix color issue in ncurses programs by updating terminfo pairs from 0x10000 to 0x7FFF
- Fix panic after quitting Alacritty on macOS
- Tabs are no longer replaced by spaces when copying them to the clipboard
+- Alt modifier is no longer sent separately from the modified key
## Version 0.2.4
diff --git a/src/input.rs b/src/input.rs
index 07887ad9..23ccdd58 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -687,16 +687,16 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> {
self.ctx.clear_selection();
let utf8_len = c.len_utf8();
- if *self.ctx.received_count() == 0 && self.ctx.last_modifiers().alt && utf8_len == 1 {
- self.ctx.write_to_pty(b"\x1b".to_vec());
- }
-
let mut bytes = Vec::with_capacity(utf8_len);
unsafe {
bytes.set_len(utf8_len);
c.encode_utf8(&mut bytes[..]);
}
+ if *self.ctx.received_count() == 0 && self.ctx.last_modifiers().alt && utf8_len == 1 {
+ bytes.insert(0, b'\x1b');
+ }
+
self.ctx.write_to_pty(bytes);
*self.ctx.received_count() += 1;