Browse Source

org-element: Better threshold computation during synchronization

* lisp/org-element.el (org-element--cache-process-request): Threshold
  is based off beginning of the first element to shift instead of the
  end of the changes.
Nicolas Goaziou 10 years ago
parent
commit
093d455f7f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org-element.el

+ 1 - 1
lisp/org-element.el

@@ -5155,7 +5155,7 @@ request."
 	;; contains the real beginning position of the first element
 	;; to shift and re-parent.
 	(when (equal (aref request 0) next) (throw 'quit t))
-	(let ((limit (+ (aref request 2) (aref request 3) extra)))
+	(let ((limit (+ (aref request 1) (aref request 3) extra)))
 	  (when (and threshold (< threshold limit)) (throw 'interrupt nil))
 	  (let ((parent (org-element--parse-to limit t time-limit)))
 	    (aset request 4 parent)