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.
This commit is contained in:
Nicolas Goaziou 2014-06-30 17:51:30 +02:00
parent 1a9b074d9f
commit 093d455f7f
1 changed files with 1 additions and 1 deletions

View File

@ -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)