aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty/src/input.rs')
-rw-r--r--alacritty/src/input.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/alacritty/src/input.rs b/alacritty/src/input.rs
index 6de9b6d9..f5f4106c 100644
--- a/alacritty/src/input.rs
+++ b/alacritty/src/input.rs
@@ -128,6 +128,10 @@ impl<T: EventListener> Execute<T> for Action {
fn execute<A: ActionContext<T>>(&self, ctx: &mut A) {
match *self {
Action::Esc(ref s) => {
+ if ctx.config().ui_config.mouse.hide_when_typing {
+ ctx.window_mut().set_mouse_visible(false);
+ }
+
ctx.clear_selection();
ctx.scroll(Scroll::Bottom);
ctx.write_to_pty(s.clone().into_bytes())
@@ -171,7 +175,13 @@ impl<T: EventListener> Execute<T> for Action {
ctx.launch_url(url);
}
},
- Action::ViMotion(motion) => ctx.terminal_mut().vi_motion(motion),
+ Action::ViMotion(motion) => {
+ if ctx.config().ui_config.mouse.hide_when_typing {
+ ctx.window_mut().set_mouse_visible(false);
+ }
+
+ ctx.terminal_mut().vi_motion(motion)
+ },
Action::ToggleFullscreen => ctx.window_mut().toggle_fullscreen(),
#[cfg(target_os = "macos")]
Action::ToggleSimpleFullscreen => ctx.window_mut().toggle_simple_fullscreen(),
@@ -714,6 +724,10 @@ impl<'a, T: EventListener, A: ActionContext<T>> Processor<'a, T, A> {
return;
}
+ if self.ctx.config().ui_config.mouse.hide_when_typing {
+ self.ctx.window_mut().set_mouse_visible(false);
+ }
+
self.ctx.scroll(Scroll::Bottom);
self.ctx.clear_selection();