From 580aa038224ad34892d2251fe60aa465535e015d Mon Sep 17 00:00:00 2001 From: Nicolas Petton Date: Thu, 25 Feb 2021 12:41:38 +0100 Subject: * nroam.el (nroam--ensure-empty-line): Do dot move to point-max. --- nroam.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'nroam.el') diff --git a/nroam.el b/nroam.el index 0f1d7c2..db72814 100644 --- a/nroam.el +++ b/nroam.el @@ -294,9 +294,8 @@ Temporary fix until `org-roam' v2 is out." (if (> n 1) "s" ""))) (defun nroam--ensure-empty-line () - "Insert a newline character if the buffer does not end with a newline." + "Insert a newline character if the buffer does contain one before point." (let ((inhibit-read-only t)) - (goto-char (point-max)) (unless (eq ?\n (char-before (1- (point)))) (insert "\n")))) (defun nroam--do-separated-by-newlines (function sequence) -- cgit v1.2.3-54-g00ecf