org-element-at-point: Fix breakage when called at the end of section

* lisp/org-element.el (org-element-at-point): Do no unconditionally
return first matching cached element when point is within blank lines
after section element and CACHED-ONLY is non-nil.

Fixes https://list.orgmode.org/smbl59$qjm$1@ciao.gmane.io/T/#u
This commit is contained in:
Ihor Radchenko 2021-11-09 19:42:14 +08:00
parent e961125768
commit 494c203639
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 0 additions and 3 deletions

View File

@ -7511,9 +7511,6 @@ element ending there."
(and (org-element-property :contents-begin element)
(>= pom (org-element-property :begin element))
(< pom (org-element-property :contents-begin element)))
(and (org-element-property :contents-end element)
(< pom (org-element-property :end element))
(>= pom (org-element-property :contents-end element)))
(and (not (org-element-property :contents-end element))
(>= pom (org-element-property :begin element))
(< pom (org-element-property :end element)))))))