aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-06-15 11:10:09 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-06-15 15:51:43 +0200
commit25c5c274e60f42005a62e63fdeebae6031bbf9fc (patch)
tree8eeee91173c2b3d5d9173535659d74ac04baa589
parent45e07cbdd54679e7a862d1589ff4649d2db6a5d3 (diff)
downloadvis-25c5c274e60f42005a62e63fdeebae6031bbf9fc.tar.gz
vis-25c5c274e60f42005a62e63fdeebae6031bbf9fc.tar.xz
view: make sure primary selection is visible
-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) {