diff options
-rw-r--r-- | lisp/ldg-mode.el | 2 | ||||
-rw-r--r-- | lisp/ldg-reconcile.el | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/lisp/ldg-mode.el b/lisp/ldg-mode.el index 42571a17..fe12b105 100644 --- a/lisp/ldg-mode.el +++ b/lisp/ldg-mode.el @@ -164,7 +164,7 @@ Can indent, complete or align depending on context." (define-key map [(control ?c) (control ?y)] 'ledger-set-year) (define-key map [(control ?c) (control ?p)] 'ledger-display-balance-at-point) (define-key map [(control ?c) (control ?l)] 'ledger-display-ledger-stats) - (define-key map [(control ?c) (control ?q)] 'ledger-mode-clean-buffer) + (define-key map [(control ?c) (control ?q)] 'ledger-post-align-xact) (define-key map [tab] 'ledger-magic-tab) (define-key map [(control tab)] 'ledger-post-align-xact) 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." |