diff options
author | Nicolas Petton | 2021-02-25 10:31:24 +0100 |
---|---|---|
committer | Nicolas Petton | 2021-02-25 10:31:24 +0100 |
commit | e24bb972f65f1d8b33ddbe9c7823c270e326080a (patch) | |
tree | 36f0d91462fc50ffa88cc315b31f417ee9244afc | |
parent | 4ff1c7d89b944ea9bdef4e9d47915e5f4fe56cc6 (diff) | |
download | nroam-e24bb972f65f1d8b33ddbe9c7823c270e326080a.tar.gz nroam-e24bb972f65f1d8b33ddbe9c7823c270e326080a.zip |
Do not insert a new line if the buffer is empty
* nroam.el (nroam--insert): When the buffer is empty, do not insert a newline at
it would be inserted at the beginning of the buffer.
-rw-r--r-- | nroam.el | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -189,7 +189,8 @@ Make the region inserted by BODY read-only, and marked with (with-buffer-modified-unmodified (save-excursion (goto-char p) - (nroam--ensure-empty-line) + (unless (bobp) + (nroam--ensure-empty-line)) (with-nroam-markers (nroam--do-separated-by-newlines #'funcall nroam-sections)) (when (nroam--sections-inserted-p) |