mirror of
https://github.com/org-roam/org-roam
synced 2025-08-05 12:37:23 -05:00
(node): fix org-roam-node-at-point check (#2195)
org-roam-node-at-point returned the wrong value if point-min is a level-1 heading node. We make sure that everytime we go up one heading, the outline-level changes (reduces by 1) to prevent this error.
This commit is contained in:
@ -224,9 +224,13 @@ populated."
|
|||||||
(magit-section-up)
|
(magit-section-up)
|
||||||
(org-roam-node-at-point)))
|
(org-roam-node-at-point)))
|
||||||
(t (org-with-wide-buffer
|
(t (org-with-wide-buffer
|
||||||
(org-back-to-heading-or-point-min t)
|
(while (not (or (org-roam-db-node-p)
|
||||||
(while (and (not (org-roam-db-node-p))
|
(bobp)
|
||||||
(not (bobp)))
|
;; Handle case where top-level is a heading
|
||||||
|
(= (funcall outline-level)
|
||||||
|
(save-excursion
|
||||||
|
(org-roam-up-heading-or-point-min)
|
||||||
|
(funcall outline-level)))))
|
||||||
(org-roam-up-heading-or-point-min))
|
(org-roam-up-heading-or-point-min))
|
||||||
(when-let ((id (org-id-get)))
|
(when-let ((id (org-id-get)))
|
||||||
(org-roam-populate
|
(org-roam-populate
|
||||||
|
Reference in New Issue
Block a user