summaryrefslogtreecommitdiff
path: root/lisp/ldg-reconcile.el
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-06-27 21:36:22 -0700
committerCraig Earls <enderw88@gmail.com>2013-06-27 21:36:22 -0700
commit52dd81ca9e64f0b3a413156f8cc1d57e2cf162c6 (patch)
tree14bd7cde6a348551825eeef9b360123e4c932d39 /lisp/ldg-reconcile.el
parent26d7197f6429332af0f363bb708bf99517533515 (diff)
downloadfork-ledger-52dd81ca9e64f0b3a413156f8cc1d57e2cf162c6.tar.gz
fork-ledger-52dd81ca9e64f0b3a413156f8cc1d57e2cf162c6.tar.bz2
fork-ledger-52dd81ca9e64f0b3a413156f8cc1d57e2cf162c6.zip
Added buffer cleanup and tweaked the reconcile quit routines.
Diffstat (limited to 'lisp/ldg-reconcile.el')
-rw-r--r--lisp/ldg-reconcile.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/ldg-reconcile.el b/lisp/ldg-reconcile.el
index 24168061..ae5142b7 100644
--- a/lisp/ldg-reconcile.el
+++ b/lisp/ldg-reconcile.el
@@ -203,7 +203,7 @@ Return the number of uncleared xacts found."
(target-buffer (if where
(ledger-reconcile-get-buffer where)
nil))
- (cur-buf (get-buffer ledger-recon-buffer-name)))
+ (cur-win (get-buffer-window (get-buffer ledger-recon-buffer-name))))
(when target-buffer
(switch-to-buffer-other-window target-buffer)
(ledger-goto-line (cdr where))
@@ -211,10 +211,8 @@ Return the number of uncleared xacts found."
(recenter)
(ledger-highlight-xact-under-point)
(forward-char -1)
- (if come-back
- (select-window
- (get-buffer-window
- (get-buffer ledger-recon-buffer-name))))))))
+ (if (and come-back cur-win)
+ (select-window cur-win))))))
(defun ledger-reconcile-save ()
"Save the ledger buffer."