summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--nroam.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/nroam.el b/nroam.el
index 322fd41..d30b8e4 100644
--- a/nroam.el
+++ b/nroam.el
@@ -139,9 +139,10 @@ Make the region inserted by BODY read-only, and marked with
(defun nroam--point-at-section-p ()
"Return non-hil if point if on the backlinks section."
- (when-let* ((beg (marker-position nroam-start-marker))
- (end (marker-position nroam-end-marker)))
- (<= beg (point) end)))
+ (when (nroam--sections-inserted-p)
+ (when-let* ((beg (marker-position nroam-start-marker))
+ (end (marker-position nroam-end-marker)))
+ (<= beg (point) end))))
(defun nroam--update-maybe ()
"Update backlinks when in nroam-mode."