Add early return to `received_char`
This commit is contained in:
parent
9392b8e837
commit
1e815dca57
|
@ -751,7 +751,10 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> {
|
||||||
|
|
||||||
/// Process a received character
|
/// Process a received character
|
||||||
pub fn received_char(&mut self, c: char) {
|
pub fn received_char(&mut self, c: char) {
|
||||||
if !*self.ctx.suppress_chars() {
|
if *self.ctx.suppress_chars() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
self.ctx.scroll(Scroll::Bottom);
|
self.ctx.scroll(Scroll::Bottom);
|
||||||
self.ctx.clear_selection();
|
self.ctx.clear_selection();
|
||||||
|
|
||||||
|
@ -774,7 +777,6 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> {
|
||||||
|
|
||||||
*self.ctx.received_count() += 1;
|
*self.ctx.received_count() += 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// Attempts to find a binding and execute its action
|
/// Attempts to find a binding and execute its action
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue