Skip to content

Commit

Permalink
Fix corner case inspector--temp-buffer is killed
Browse files Browse the repository at this point in the history
When the said variable is non-nil but is a kill buffer, operations that
use it will raise an error.
  • Loading branch information
daanturo committed Jul 31, 2024
1 parent 4e85b25 commit e5cc60a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions inspector.el
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,10 @@ See: `inspector--with-inspector-temp-buffer'.")

(defun inspector--get-inspector-temp-buffer ()
"Return a (cached) inspector temporary buffer."
(or inspector--temp-buffer
(setq inspector--temp-buffer
(get-buffer-create "*inspector-temp*"))))
(unless (buffer-live-p inspector--temp-buffer)
(setq inspector--temp-buffer
(get-buffer-create "*inspector-temp*")))
inspector--temp-buffer)

(defun inspector--print-truncated (object &optional limit)
"Print OBJECT to a string, truncated.
Expand Down

0 comments on commit e5cc60a

Please sign in to comment.