From 033db8997ba235affe991f3659528f88759729b7 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 15 Apr 2014 13:42:54 -0600 Subject: [PATCH] Batch updates when moving cursors This ensures that updates associated with autoscroll and cursor movement get combined. --- src/editor.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editor.coffee b/src/editor.coffee index 8e1fb37f4..17291844c 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -1472,7 +1472,8 @@ class Editor extends Model moveCursors: (fn) -> @movingCursors = true - fn(cursor) for cursor in @getCursors() + @batchUpdates => + fn(cursor) for cursor in @getCursors() @mergeCursors() @movingCursors = false @emit 'cursors-moved'