aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src
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 /alacritty/src
parent4b516c63654465041604d3e4c816136a902287a4 (diff)
downloadr-alacritty-1d00883f10500675bbe2bb62916d6a16499972ee.tar.gz
r-alacritty-1d00883f10500675bbe2bb62916d6a16499972ee.tar.bz2
r-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.
Diffstat (limited to 'alacritty/src')
-rw-r--r--alacritty/src/input.rs6
1 files changed, 4 insertions, 2 deletions
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;
}
}