diff options
author | Nicolas Petton | 2021-02-23 22:17:35 +0100 |
---|---|---|
committer | Nicolas Petton | 2021-02-23 22:27:17 +0100 |
commit | 58d4bcf5f53e6598aa901d8f21c9bb2d9c65191b (patch) | |
tree | 4e57119bb07ff853fc869a6c9610723597e46524 /nroam.el | |
parent | 02a791bf971c43dac2f95801a91bfd6a9f3756fc (diff) | |
download | nroam-58d4bcf5f53e6598aa901d8f21c9bb2d9c65191b.tar.gz nroam-58d4bcf5f53e6598aa901d8f21c9bb2d9c65191b.zip |
Fix nroam--point-at-section-p
* Fix `nroam--point-at-section-p' when nroam sections have not been inserted.
Diffstat (limited to 'nroam.el')
-rw-r--r-- | nroam.el | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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." |