From fcb0033d25fe01a80ce154dda356c74d41429719 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 6 Jul 2018 13:01:49 +0530 Subject: [PATCH] When drag-scrolling stop the scroll when the mouse button is released. --- docs/changelog.rst | 2 ++ kitty/mouse.c | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index b0c367e44..4a0b29472 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -19,6 +19,8 @@ Changelog nearest cell in the window. Avoids selection with the mouse failing when starting the selection just outside the window. +- When drag-scrolling stop the scroll when the mouse button is released. + 0.11.2 [2018-07-01] ------------------------------ diff --git a/kitty/mouse.c b/kitty/mouse.c index 23d8ea4d6..e14a33d2a 100644 --- a/kitty/mouse.c +++ b/kitty/mouse.c @@ -162,6 +162,7 @@ update_drag(bool from_button, Window *w, bool is_release, int modifiers) { if (from_button) { if (is_release) { global_state.active_drag_in_window = 0; + w->last_drag_scroll_at = 0; if (screen->selection.in_progress) screen_update_selection(screen, w->mouse_cell_x, w->mouse_cell_y, true); }