summaryrefslogtreecommitdiff
path: root/lisp/ldg-reconcile.el
diff options
context:
space:
mode:
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."