mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 20:37:51 +00:00
org-element: Fix corner case
* lisp/org-element.el (org-element--cache-for-removal): Fix corner case when changes happen in a robust element (e.g., a center block) within a fragile element (e.g., a plain list). Do not assume that all parents from a robust element are also robust.
This commit is contained in:
parent
ef8e9cf045
commit
126e2bcebd
|
@ -5456,12 +5456,9 @@ changes."
|
|||
(<= (org-element-property :contents-begin up) beg)
|
||||
(> (org-element-property :contents-end up) end))
|
||||
;; UP is a robust greater element containing changes.
|
||||
;; We only need to extend its ending boundaries and
|
||||
;; those of all its parents.
|
||||
(while up
|
||||
(org-element--cache-shift-positions
|
||||
up offset '(:contents-end :end))
|
||||
(setq up (org-element-property :parent up)))
|
||||
;; We only need to extend its ending boundaries.
|
||||
(org-element--cache-shift-positions
|
||||
up offset '(:contents-end :end))
|
||||
(setq before up)))
|
||||
;; We're at top level element containing ELEMENT: if it's
|
||||
;; altered by buffer modifications, it is first element in
|
||||
|
|
Loading…
Reference in a new issue