diff options
| author | duianto <otnaiud@gmail.com> | 2021-09-02 21:28:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-02 21:28:48 +0200 |
| commit | cfa44def53ff1580d6dfce6a0f8bd9ff5a556e5f (patch) | |
| tree | 312ce80bd03033ee7528640a80bb8f42e7c01bfe /evil-search.el | |
| parent | dceb73603d397f7e42a541976d8ec0711248d38c (diff) | |
Exit search prompt on mouse leave minibuffer (#1330)
With the search module: evil-search
Exit the `/` or `?` search prompts
when mouse selecting another window.
Diffstat (limited to 'evil-search.el')
| -rw-r--r-- | evil-search.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/evil-search.el b/evil-search.el index 268def2..1e9d972 100644 --- a/evil-search.el +++ b/evil-search.el @@ -892,6 +892,7 @@ message to be shown. This function does nothing if (remove-hook 'minibuffer-setup-hook #'evil-ex-search-start-session) (add-hook 'after-change-functions #'evil-ex-search-update-pattern nil t) (add-hook 'minibuffer-exit-hook #'evil-ex-search-stop-session) + (add-hook 'mouse-leave-buffer-hook #'evil-ex-search-exit) (evil-ex-search-activate-highlight nil)) (put 'evil-ex-search-start-session 'permanent-local-hook t) @@ -908,6 +909,7 @@ message to be shown. This function does nothing if (setq isearch-opened-overlays (delete-dups isearch-opened-overlays)) (isearch-clean-overlays)) (remove-hook 'minibuffer-exit-hook #'evil-ex-search-stop-session) + (remove-hook 'mouse-leave-buffer-hook #'evil-ex-search-exit) (remove-hook 'after-change-functions #'evil-ex-search-update-pattern t) (when evil-ex-search-overlay (delete-overlay evil-ex-search-overlay) |
