summaryrefslogtreecommitdiff
path: root/lisp/ledger-state.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/ledger-state.el')
-rw-r--r--lisp/ledger-state.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/ledger-state.el b/lisp/ledger-state.el
index 53e08e22..989e6d33 100644
--- a/lisp/ledger-state.el
+++ b/lisp/ledger-state.el
@@ -103,9 +103,9 @@ dropped."
(skip-chars-forward " \t")
(when (not (eq (ledger-state-from-char (char-after)) 'comment))
(insert (ledger-char-from-state cur-status) " ")
- (if (search-forward " " (line-end-position) t)
- (if (looking-at " ")
- (delete-char 2))))
+ (if (and (search-forward " " (line-end-position) t)
+ (looking-at " "))
+ (delete-char 2)))
(forward-line))
(setq new-status nil)))