Ensure ledger-mode display balance can handle zero balance accounts.

This commit is contained in:
Craig Earls 2013-05-06 09:04:04 -07:00
parent 3d531c08cd
commit 6b10e2e909

View file

@ -63,7 +63,9 @@ And calculate the target-delta of the account being reconciled."
(buffer (current-buffer))
(balance (with-temp-buffer
(ledger-exec-ledger buffer (current-buffer) "cleared" account)
(buffer-substring-no-properties (point-min) (1- (point-max))))))
(if (> (buffer-size) 0)
(buffer-substring-no-properties (point-min) (1- (point-max)))
(concat account " is empty.")))))
(when balance
(message balance))))