summaryrefslogtreecommitdiff
path: root/helm.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2018-01-22 08:20:19 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2018-01-22 08:20:19 +0100
commitc00949a5136a3cb7ab82e4b2f3e33e92ee2b0734 (patch)
tree1efa6e4c809ab1263e692c0d4b835e4138683a89 /helm.el
parent33211f3b5e2305179528bff1439c597809d7b45f (diff)
Ensure to not quit helm session when deleting another
frame while helm running. * helm.el (helm--delete-frame-function): Check if the deleted frame handle helm-buffer.
Diffstat (limited to 'helm.el')
-rw-r--r--helm.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/helm.el b/helm.el
index 2009a2df..2cd9cb7f 100644
--- a/helm.el
+++ b/helm.el
@@ -2766,10 +2766,13 @@ Note that this feature is available only with emacs-25+."
(display-buffer
buffer '(display-buffer-pop-up-frame . nil))))
-;; When user delete manually helm frame ensure helm session is
-;; quitted.
-(defun helm--delete-frame-function (_frame)
- (when helm-alive-p (helm-keyboard-quit)))
+;; Ensure to quit helm when user delete helm frame manually.
+;; If user deletes another frame keep session running.
+(defun helm--delete-frame-function (frame)
+ (when (and helm-alive-p
+ ;; FRAME is handling helm-buffer
+ (get-buffer-window helm-buffer frame))
+ (helm-keyboard-quit)))
(add-hook 'delete-frame-functions 'helm--delete-frame-function)
;;; Initialize