From 8afc183730828144ad42c4d9ae08b1885e0f2ccd Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Tue, 24 Jun 2014 20:48:20 -0700 Subject: Fix bug 1059, ledger mode deletes character if a posting is cleared but there are less that four space between the account and the amount. --- lisp/ledger-state.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ledger-state.el b/lisp/ledger-state.el index 2080363e..53e08e22 100644 --- a/lisp/ledger-state.el +++ b/lisp/ledger-state.el @@ -104,7 +104,8 @@ dropped." (when (not (eq (ledger-state-from-char (char-after)) 'comment)) (insert (ledger-char-from-state cur-status) " ") (if (search-forward " " (line-end-position) t) - (delete-char 2))) + (if (looking-at " ") + (delete-char 2)))) (forward-line)) (setq new-status nil))) -- cgit v1.2.3