summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Nicolas Petton2021-03-13 14:19:45 +0100
committerGravatar Nicolas Petton2021-03-13 14:19:45 +0100
commit7ae549a22225eb1dd099cd63726dc164109c92d7 (patch)
tree6d356d01125be54487108e805b3685fe44152879
parente44ea27370ee631e8dc31434d524195070778fd1 (diff)
downloadnroam-7ae549a22225eb1dd099cd63726dc164109c92d7.tar.gz
nroam-7ae549a22225eb1dd099cd63726dc164109c92d7.zip
Fix #13 #10
* nroam.el (with-nroam-markers): Add an extra \n char in read-write so that text can be inserted at the end of the buffer.
-rw-r--r--nroam.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/nroam.el b/nroam.el
index b0d9951..b5bb4ab 100644
--- a/nroam.el
+++ b/nroam.el
@@ -78,6 +78,10 @@ Make the region inserted by BODY read-only, and marked with
,@body
(put-text-property beg (1+ beg) 'front-sticky '(read-only))
(put-text-property beg (point) 'read-only t)
+ ;; Add a non-read-only newline so that text can be inserted at the end of
+ ;; the buffer.
+ (let ((inhibit-read-only t))
+ (insert "\n"))
(set-marker nroam-end-marker (point))))
(defvar nroam-mode-map