Don’t err in pip-frame-remove-buffer if there is no PIP frame
This is useful e.g. to prevent the error when a PIP frame with a temporarily displayed buffer is deleted before the buffer timer attempts to remove the buffer.
This commit is contained in:
parent
e8b16420f8
commit
8c396a11f5
@ -175,7 +175,8 @@ If the buffer is not present in the PIP frame, do nothing."
|
||||
(interactive (list (completing-read "Remove PIP buffer: "
|
||||
(mapcar #'buffer-name (pip-frame--buffers))
|
||||
nil t)))
|
||||
(let* ((windows (window-list (pip-frame--get-frame)))
|
||||
(if-let ((frame (pip-frame--get-frame t))
|
||||
(windows (window-list frame))
|
||||
(buffer (get-buffer buffer-or-name))
|
||||
(windows-to-delete (cl-remove buffer windows
|
||||
:key #'window-buffer
|
||||
|
Loading…
Reference in New Issue
Block a user