org-up-heading-safe: Return true level, ignoring org-odd-levels-only

* lisp/org.el (org-up-heading-safe): Fix return value, making sure
that the returned level is not reduced.

Reported-by: E.L.K. <some.any.key@gmail.com>
Link: https://orgmode.org/list/CAF+cOoPuh8rzVRoV9-pGSP3SVRm-M8ZQrM=xGB+o4TqJat_O-A@mail.gmail.com
This commit is contained in:
Ihor Radchenko 2024-02-29 14:38:38 +03:00
parent fe9bc9efd1
commit 8648576573
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -20441,7 +20441,7 @@ make a significant difference in outlines with very many siblings."
(<= (point-min) (org-element-property :begin parent))) (<= (point-min) (org-element-property :begin parent)))
(progn (progn
(goto-char (org-element-property :begin parent)) (goto-char (org-element-property :begin parent))
(org-element-property :level parent)) (save-excursion (skip-chars-forward "*")))
(when (and current-heading (when (and current-heading
(<= (point-min) (org-element-property :begin current-heading))) (<= (point-min) (org-element-property :begin current-heading)))
(goto-char (org-element-property :begin current-heading)) (goto-char (org-element-property :begin current-heading))