aboutsummaryrefslogtreecommitdiff
path: root/src/event.rs
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2018-11-19 08:33:48 +0000
committerGitHub <noreply@github.com>2018-11-19 08:33:48 +0000
commit42d89899162164128364c503cee29dc65103d55d (patch)
tree8e1511b4a5438272d1e9e958107a04f061b720d5 /src/event.rs
parente429b8dfdda3228838cd839783d17376a65b44fe (diff)
downloadalacritty-42d89899162164128364c503cee29dc65103d55d.tar.gz
alacritty-42d89899162164128364c503cee29dc65103d55d.zip
Add keybinding action for clearing warns/errors
Since running `clear` inside of tmux doesn't actually clear any part of the screen, but just resets the scrolling region, the warning and error notices can't be removed without quitting tmux or Alacritty. As a solution, a new action `ClearLogNotice` has been added which has been bound to Ctrl+L by default. As a result, Ctrl+L can be used inside of tmux to remove the messages, even though tmux doesn't clear the screen. This fixes #1811.
Diffstat (limited to 'src/event.rs')
-rw-r--r--src/event.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/event.rs b/src/event.rs
index ece8ec6f..f69136df 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -171,6 +171,11 @@ impl<'a, N: Notify + 'a> input::ActionContext for ActionContext<'a, N> {
fn hide_window(&mut self) {
self.window_changes.hide = true;
}
+
+ #[inline]
+ fn clear_log(&mut self) {
+ self.terminal.clear_log();
+ }
}
/// The ActionContext can't really have direct access to the Window