Don't show empty *magit-stash* buffer.

This commit is contained in:
Alexey Voinov 2010-03-16 15:47:36 +03:00
parent 7dad3be958
commit f754864373

View file

@ -2916,7 +2916,9 @@ Prefix arg means justify as well."
(setq stash (magit-section-info stash)))
(let ((dir default-directory)
(buf (get-buffer-create "*magit-stash*")))
(cond ((equal magit-currently-shown-stash stash)
(cond ((and (equal magit-currently-shown-stash stash)
(with-current-buffer buf
(> (length (buffer-string)) 1)))
(let ((win (get-buffer-window buf)))
(cond ((not win)
(display-buffer buf))