aboutsummaryrefslogtreecommitdiff
path: root/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'view.c')
-rw-r--r--view.c3
1 files changed, 3 insertions, 0 deletions
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) {