aboutsummaryrefslogtreecommitdiff
path: root/view.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-02-04 18:25:45 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-02-04 18:25:45 +0100
commit047047c719fd6c601629fbe13f4429b81b41d8e2 (patch)
treef331316bd2812c26de6d4d9c7588f7052135a7d8 /view.c
parentd5d8b5e6b85e5b88980ca50b2067ec33c432cb13 (diff)
downloadvis-047047c719fd6c601629fbe13f4429b81b41d8e2.tar.gz
vis-047047c719fd6c601629fbe13f4429b81b41d8e2.tar.xz
view: do not let new cursors automatically become primary
We currently have the invariant that the primary cursor is always placed within the visisble viewport. Previously view_cursors_new would automatically make the new cursor primary. This in turn causes the viewport to be adjusted triggering lots of unnecessary redraws. As a result commands creating many new selections might become unbearably slow. Instead the caller has to explicitly make the new cursor primary.
Diffstat (limited to 'view.c')
-rw-r--r--view.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/view.c b/view.c
index 598cf2f..742d08b 100644
--- a/view.c
+++ b/view.c
@@ -981,7 +981,6 @@ static Cursor *cursors_new(View *view, size_t pos, bool force) {
} else {
view->cursors = c;
}
- view->cursor = c;
view->cursor_count++;
view_cursors_dispose(view->cursor_dead);
view_cursors_to(c, pos);