From 047047c719fd6c601629fbe13f4429b81b41d8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 4 Feb 2017 18:25:45 +0100 Subject: 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. --- view.c | 1 - 1 file changed, 1 deletion(-) (limited to 'view.c') 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); -- cgit v1.2.3