summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Gustav Wikström2021-02-24 19:57:39 +0100
committerGravatar Gustav Wikström2021-02-24 19:57:39 +0100
commit57e6e0f99495fdb819f57fabd1ff4452eed87189 (patch)
treee28e1728a5f33fa23e228cf669ba8c5c76bf3f00
parenta5126d19ac80833a1dbde6abae151127431e4e22 (diff)
downloadnroam-57e6e0f99495fdb819f57fabd1ff4452eed87189.tar.gz
nroam-57e6e0f99495fdb819f57fabd1ff4452eed87189.zip
Improve code for narrowing in nroam--insert
* nroam.el (nroam--insert): Improve code for narrowing.
-rw-r--r--nroam.el4
1 files changed, 1 insertions, 3 deletions
diff --git a/nroam.el b/nroam.el
index 87855d7..7c3f379 100644
--- a/nroam.el
+++ b/nroam.el
@@ -192,10 +192,8 @@ Make the region inserted by BODY read-only, and marked with
(with-nroam-markers
(seq-do #'funcall nroam-sections))
(when (nroam--sections-inserted-p)
- (goto-char (+ p 1)) ; maybe to implicit. But loc. of new
- ; backlinks section
(save-restriction
- (org-narrow-to-subtree)
+ (narrow-to-region p (point-max))
(org-set-startup-visibility)))))))
(defun nroam--get-backlinks ()