Browse Source

Only delete the capture window if it has no parent

delete-window will give an error if the window is the sole window in its
frame. In my emacs confige i use popup-like 'capture' frames for
denting, twisting, etc.
On cancelling or posting, the delete-window would fail, so a test for a
parent window prevents this.
master
Marcel van der Boom 11 years ago
parent
commit
b11ee2ad1b
  1. 3
      twister.el

3
twister.el

@ -165,7 +165,8 @@ while PARAMS contain the rest of the parameters." @@ -165,7 +165,8 @@ while PARAMS contain the rest of the parameters."
(interactive)
(when (get-buffer twister-post-buffername)
(with-current-buffer twister-post-buffername
(delete-window)
;; if the window is the sole window in its frame, delete-window will error
(if (window-parent) (delete-window))
(kill-buffer twister-post-buffername)
)))

Loading…
Cancel
Save