org-element-cache: Fix merging intersecting Phase 0 requests

* lisp/org-element.el (org-element--cache-submit-request): Extend
calculation of affected parent elements to the full changed region.
The previous behaviour could miss some outer elements to be removed.
This commit is contained in:
Ihor Radchenko 2021-12-12 16:13:16 +08:00
parent 9c7acaa02d
commit 798435be85
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -6779,7 +6779,7 @@ change, as an integer."
;; new modification may also have non-nil
;; `org-element--cache-change-warning'. In the latter case, we
;; also need to update the request.
(let ((first (org-element--cache-for-removal beg end offset) ; Shift as needed.
(let ((first (org-element--cache-for-removal delete-from end offset) ; Shift as needed.
))
(org-element--cache-log-message "Current request is inside next. Candidate parent: %S"
(org-element--format-element first))