         if changeObj?
             @apply_changeObj(changeObj)
 
-    # Set the value of the buffer to something new by replacing just the ranges
-    # that changed, so that the view/history/etc. doesn't get messed up.
-    # Setting scroll_last to ture sets cursor to last changed position and puts cursors
+    # Try to set the value of the buffer to something new by replacing just the ranges
+    # that changed, so that the viewport/history/etc. doesn't get messed up.
+    # Setting scroll_last to true sets cursor to last changed position and puts cursors
     # there; this is used for undo/redo.
+    # **NOTE:** there are no guarantees, since if the patch to transform from  current to
+    # value involves a "huge" (at least 500) number of chunks, then we just set the value
+    # directly since apply thousands of chunks will lock the cpu for seconds.  This will
+    # slightly mess up the scroll position, undo position, etc.  It's worth it.
     CodeMirror.defineExtension 'setValueNoJump', (value, scroll_last) ->
         if not value?
             # Special case -- trying to set to value=undefined.  This is the sort of thing

        b      = @setBookmark(line:@lineAtHeight(t, 'local'))
        before = @heightAtLine(@lineAtHeight(t, 'local'))

        # Change the buffer in place by applying the diffs as we go; this avoids replacing the entire buffer,
        # which would cause total chaos.
        last_pos = @diffApply(dmp.diff_main(current_value, value))

        # Now, if possible, restore the exact scroll position.
        n = b.find()?.line

            return
        current_value = @getValue()
        if value == current_value
            # Special case: nothing to do
            return

        r = @getOption('readOnly')
