From 25c5c274e60f42005a62e63fdeebae6031bbf9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 15 Jun 2017 11:10:09 +0200 Subject: view: make sure primary selection is visible --- view.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'view.c') diff --git a/view.c b/view.c index 178fb31..d6de690 100644 --- a/view.c +++ b/view.c @@ -1055,6 +1055,9 @@ void view_selections_primary_set(Selection *s) { if (!s) return; s->view->selection = s; + Mark anchor = s->anchor; + view_cursors_to(s, view_cursors_pos(s)); + s->anchor = anchor; } Selection *view_selections_prev(Selection *s) { -- cgit v1.2.3