diff options
author | Craig Earls <enderw88@gmail.com> | 2013-02-20 21:16:05 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2013-02-20 21:16:05 -0700 |
commit | a4e76727be273185c7eee5758262d58c5aa4ccdd (patch) | |
tree | 12150b1685f5da0a030fa45349556e1da5ec7aea | |
parent | 8029fd1149a607ee2eed7712194904b6c711d4b4 (diff) | |
download | fork-ledger-a4e76727be273185c7eee5758262d58c5aa4ccdd.tar.gz fork-ledger-a4e76727be273185c7eee5758262d58c5aa4ccdd.tar.bz2 fork-ledger-a4e76727be273185c7eee5758262d58c5aa4ccdd.zip |
Put in more nil window protection.
-rw-r--r-- | lisp/ldg-occur.el | 3 | ||||
-rw-r--r-- | lisp/ldg-reconcile.el | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lisp/ldg-occur.el b/lisp/ldg-occur.el index 417a3d2a..c3f04c5d 100644 --- a/lisp/ldg-occur.el +++ b/lisp/ldg-occur.el @@ -82,7 +82,8 @@ When REGEX is nil, unhide everything, and remove higlight" (append ledger-occur-overlay-list (ledger-occur-create-folded-overlays buffer-matches))) (setq ledger-occur-last-match regex) - (select-window (get-buffer-window buffer)))) + (if (get-buffer-window buffer) + (select-window (get-buffer-window buffer))))) (recenter))) (defun ledger-occur (regex) diff --git a/lisp/ldg-reconcile.el b/lisp/ldg-reconcile.el index 9ac89915..623d7230 100644 --- a/lisp/ldg-reconcile.el +++ b/lisp/ldg-reconcile.el @@ -320,10 +320,10 @@ POSTING is used in `ledger-clear-whole-transactions' is nil." (fit-window-to-buffer recon-window) (with-current-buffer buf (add-hook 'kill-buffer-hook 'ledger-reconcile-quit nil t) - (select-window (get-buffer-window buf)) + (if (get-window-for-other-buffer buf) + (select-window (get-buffer-window buf))) (goto-char (point-max)) (recenter -1)) - (select-window recon-window) (ledger-reconcile-visit t)) (add-hook 'post-command-hook 'ledger-reconcile-track-xact nil t)))) |