From 29c31054a1a4dc2b51a486829830b47ef5e8d772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 11 Jan 2022 20:26:49 +0100 Subject: [PATCH] input: reset view when pasting from primary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We’re already doing this for keyboard input, and regular clipboard pastes. --- CHANGELOG.md | 2 ++ input.c | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9caf6c82..ee5b8da1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,6 +80,8 @@ * Rendering of CSD borders when `csd.border-width > 0` and desktop scaling has been enabled. * Failure to launch when `exec(3)’:ed with an empty argv. +* Pasting from the primary clipboard (mouse middle clicking) did not + reset the scrollback view to the bottom. ### Security diff --git a/input.c b/input.c index ab177bf8..6013634e 100644 --- a/input.c +++ b/input.c @@ -145,6 +145,7 @@ execute_binding(struct seat *seat, struct terminal *term, case BIND_ACTION_PRIMARY_PASTE: selection_from_primary(seat, term); + term_reset_view(term); return true; case BIND_ACTION_SEARCH_START: