浏览代码

org-element: Tiny refactoring

* lisp/org-element.el (org-element--cache-submit-request): Tiny
  refactoring.
Nicolas Goaziou 10 年之前
父节点
当前提交
67c1e54a5b
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      lisp/org-element.el

+ 3 - 3
lisp/org-element.el

@@ -5477,9 +5477,9 @@ change, as an integer."
   (let ((next (car org-element--cache-sync-requests)))
     (if (and next
 	     (zerop (aref next 5))
-	     (let ((offset (aref next 3)))
-	       (and (>= (+ (aref next 2) offset) end)
-		    (<= (+ (aref next 1) offset) end))))
+	     (let ((relative-end (- end (aref next 3))))
+	       (and (> (aref next 2) relative-end)
+		    (<= (aref next 1) relative-end))))
 	;; Current changes can be merged with first sync request: we
 	;; can save a partial cache synchronization.
 	(progn