summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2020-08-09 23:29:58 +0000
committerGitHub <noreply@github.com>2020-08-09 23:29:58 +0000
commit1d00883f10500675bbe2bb62916d6a16499972ee (patch)
treecee32d10f5154df96bd2bbd0455f6f2e89796c52
parent4b516c63654465041604d3e4c816136a902287a4 (diff)
downloadalacritty-1d00883f10500675bbe2bb62916d6a16499972ee.tar.gz
alacritty-1d00883f10500675bbe2bb62916d6a16499972ee.zip
Fix characters swallowed during search
This resolves a bug where characters get swallowed when pressing them after pressing backspace before the backspace key is released.
-rw-r--r--CHANGELOG.md1
-rw-r--r--alacritty/src/input.rs6
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0d792622..03b69325 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Incorrect window location with negative `window.position` config options
- Slow rendering performance with HiDPI displays, especially on macOS
+- Keys swallowed during search when pressing them right before releasing backspace
## 0.5.0
diff --git a/alacritty/src/input.rs b/alacritty/src/input.rs
index 44d81217..c5407090 100644
--- a/alacritty/src/input.rs
+++ b/alacritty/src/input.rs
@@ -863,7 +863,7 @@ impl<'a, T: EventListener, A: ActionContext<T>> Processor<'a, T, A> {
*self.ctx.received_count() = 0;
self.process_key_bindings(input);
},
- ElementState::Released => *self.ctx.suppress_chars() = false,
+ ElementState::Released => (),
}
}
@@ -892,6 +892,8 @@ impl<'a, T: EventListener, A: ActionContext<T>> Processor<'a, T, A> {
}
}
+ *self.ctx.suppress_chars() = false;
+
return;
}
@@ -951,7 +953,7 @@ impl<'a, T: EventListener, A: ActionContext<T>> Processor<'a, T, A> {
let binding = binding.clone();
binding.execute(&mut self.ctx);
- // Don't suppress when there has been a `ReceiveChar` action.
+ // Pass through the key if any of the bindings has the `ReceiveChar` action.
*suppress_chars.get_or_insert(true) &= binding.action != Action::ReceiveChar;
}
}