From 0900d01ec9fce2e64384ef27111fe1a4d9d45068 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 25 Oct 2021 19:39:46 +0200 Subject: input: clean up mouse scroll handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Allow scrolling on the normal (non-alt) screen, when application is grabbing the mouse (when user presses Shift). * Use term_mouse_grabbed() instead of explicitly checking for MOUSE_NONE tracking. * Remove mouse tracking check from cmd_scrollback_{up,down}. Caller is expected to have done the check. * Don’t scroll down on mouse wheel tilt events. --- commands.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'commands.c') diff --git a/commands.c b/commands.c index e7dafdfc..4b0306aa 100644 --- a/commands.c +++ b/commands.c @@ -18,9 +18,6 @@ cmd_scrollback_up(struct terminal *term, int rows) if (urls_mode_is_active(term)) return; - if (term->mouse_tracking != MOUSE_NONE) - return; - rows = min(rows, term->rows); xassert(term->grid->offset >= 0); @@ -98,9 +95,6 @@ cmd_scrollback_down(struct terminal *term, int rows) if (urls_mode_is_active(term)) return; - if (term->mouse_tracking != MOUSE_NONE) - return; - if (term->grid->view == term->grid->offset) return; -- cgit v1.3