summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2014-02-24 14:16:46 -0700
committerCraig Earls <enderw88@gmail.com>2014-02-24 14:16:46 -0700
commitbb8e000d5b35fc4a42c61cf92037674c09d996ca (patch)
treef678b18d36f29f6efee8624490ea374de208eaa6 /lisp
parent1003c241038544ff541c22138616646ea56b6f52 (diff)
downloadfork-ledger-bb8e000d5b35fc4a42c61cf92037674c09d996ca.tar.gz
fork-ledger-bb8e000d5b35fc4a42c61cf92037674c09d996ca.tar.bz2
fork-ledger-bb8e000d5b35fc4a42c61cf92037674c09d996ca.zip
Make reconcile window refresh xact locations after a delete operation
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-reconcile.el31
1 files changed, 17 insertions, 14 deletions
diff --git a/lisp/ledger-reconcile.el b/lisp/ledger-reconcile.el
index 23211a6c..d58a7f4f 100644
--- a/lisp/ledger-reconcile.el
+++ b/lisp/ledger-reconcile.el
@@ -205,7 +205,8 @@ Return the number of uncleared xacts found."
(let ((inhibit-read-only t))
(goto-char (line-beginning-position))
(delete-region (point) (1+ (line-end-position)))
- (set-buffer-modified-p t)))))
+ (set-buffer-modified-p t))
+ (ledger-reconcile-refresh))))
(defun ledger-reconcile-visit (&optional come-back)
"Recenter ledger buffer on transaction and COME-BACK if non-nil."
@@ -321,23 +322,25 @@ POSTING is used in `ledger-clear-whole-transactions' is nil."
(dolist (posting (nthcdr 5 xact))
(let ((beg (point))
(where (ledger-marker-where-xact-is xact posting)))
- (insert (format "%s %-4s %-30s %-30s %15s\n"
+ (insert (format "%s %-4s %-50s %-30s %15s\n"
(format-time-string date-format (nth 2 xact))
- (if (nth 3 xact)
- (nth 3 xact)
- "")
- (nth 4 xact) (nth 1 posting) (nth 2 posting)))
+ (if (nth 3 xact)
+ (nth 3 xact)
+ "")
+ (truncate-string-to-width
+ (nth 4 xact) 49)
+ (nth 1 posting) (nth 2 posting)))
(if (nth 3 posting)
(if (eq (nth 3 posting) 'pending)
- (set-text-properties beg (1- (point))
- (list 'face 'ledger-font-reconciler-pending-face
- 'where where))
- (set-text-properties beg (1- (point))
- (list 'face 'ledger-font-reconciler-cleared-face
- 'where where)))
+ (set-text-properties beg (1- (point))
+ (list 'face 'ledger-font-reconciler-pending-face
+ 'where where))
+ (set-text-properties beg (1- (point))
+ (list 'face 'ledger-font-reconciler-cleared-face
+ 'where where)))
(set-text-properties beg (1- (point))
- (list 'face 'ledger-font-reconciler-uncleared-face
- 'where where)))) ))
+ (list 'face 'ledger-font-reconciler-uncleared-face
+ 'where where)))) ))
(goto-char (point-max))
(delete-char -1)) ;gets rid of the extra line feed at the bottom of the list
(if ledger-success