org-element: Fix infloop in `org-element-at-point'
* lisp/org-element.el (org-element-at-point): Fix infloop when called on a blank line at the end of the buffer after a headline.
This commit is contained in:
parent
68b0dba851
commit
072f2abe4c
|
@ -4735,7 +4735,7 @@ first element of current section."
|
||||||
(org-back-to-heading)
|
(org-back-to-heading)
|
||||||
(forward-line)
|
(forward-line)
|
||||||
(org-skip-whitespace)
|
(org-skip-whitespace)
|
||||||
(when (> (line-beginning-position) origin)
|
(when (or (eobp) (> (line-beginning-position) origin))
|
||||||
;; In blank lines just after the headline, point still
|
;; In blank lines just after the headline, point still
|
||||||
;; belongs to the headline.
|
;; belongs to the headline.
|
||||||
(throw 'exit
|
(throw 'exit
|
||||||
|
|
Loading…
Reference in New Issue