summaryrefslogtreecommitdiff
path: root/helm-utils.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2018-01-15 08:05:46 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2018-01-15 08:05:46 +0100
commitac96d83253fa052f0067a8d867fe639ce29d3e04 (patch)
treeb867afcd26f8da7f5b51bffd6ccd400a90b35d46 /helm-utils.el
parentb998d29ff360a3f6d6c16272ba1779285836a51f (diff)
Fix helm-quit-and-find-file after a show-completion
* helm-utils.el (helm-quit-and-find-file): Do it.
Diffstat (limited to 'helm-utils.el')
-rw-r--r--helm-utils.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/helm-utils.el b/helm-utils.el
index db48d125..dacb5aec 100644
--- a/helm-utils.el
+++ b/helm-utils.el
@@ -25,6 +25,7 @@
(declare-function helm-find-files-1 "helm-files.el" (fname &optional preselect))
(declare-function popup-tip "ext:popup")
(defvar winner-boring-buffers)
+(defvar helm-show-completion-overlay)
(defgroup helm-utils nil
@@ -544,6 +545,12 @@ from its directory."
(expand-file-name (or (buffer-file-name) default-directory))))
;; Url.
((and (stringp sel) helm--url-regexp (string-match helm--url-regexp sel)) sel)
+ ;; Exit brutally from a `with-helm-show-completion'
+ ((and helm-show-completion-overlay
+ (overlayp helm-show-completion-overlay))
+ (delete-overlay helm-show-completion-overlay)
+ (remove-hook 'helm-move-selection-after-hook 'helm-show-completion)
+ (expand-file-name default-preselection))
;; Default.
(t (expand-file-name default-preselection)))))))
(put 'helm-quit-and-find-file 'helm-only t)