summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2015-08-22 18:47:05 -0700
committerCraig Earls <enderw88@gmail.com>2015-08-22 18:47:05 -0700
commit2fe6663fdb250a3f20a8eede78973acab43aaf8b (patch)
treec54133377a2a6d5b89b971b2779a36a78aa9fc65 /lisp
parentf310341bf53402b017f260bdb8d69c12a74b6fb4 (diff)
downloadfork-ledger-2fe6663fdb250a3f20a8eede78973acab43aaf8b.tar.gz
fork-ledger-2fe6663fdb250a3f20a8eede78973acab43aaf8b.tar.bz2
fork-ledger-2fe6663fdb250a3f20a8eede78973acab43aaf8b.zip
Insert an extra newline if EOBP is not on its own line when you add an act.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-xact.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ledger-xact.el b/lisp/ledger-xact.el
index 64f69cbe..b10434ac 100644
--- a/lisp/ledger-xact.el
+++ b/lisp/ledger-xact.el
@@ -89,8 +89,9 @@ MOMENT is an encoded date"
(when (and (eobp) last-xact-start)
(let ((end (cadr (ledger-navigate-find-xact-extents last-xact-start))))
(goto-char end)
- (if (eobp)
+ (if (= (line-beginning-position) (line-end-position))
(insert "\n")
+ (insert "\n\n")
(forward-line))))))
(defun ledger-xact-iterate-transactions (callback)