                 (apply orig args))
               ))
 
+(defun snails-monitor-minibuffer-enter ()
+  (when (and snails-frame
+             (frame-live-p snails-frame))
+    (snails-quit)))
+
+(add-hook 'minibuffer-setup-hook 'snails-monitor-minibuffer-enter)
+
 (cl-defmacro snails-create-sync-backend (&rest args &key name candidate-filter candiate-do)
   "Macro to create sync backend code.
 

;; Maintainer: Andy Stewart <lazycat.manatee@gmail.com>
;; Copyright (C) 2019, Andy Stewart, all rights reserved.
;; Created: 2019-05-16 21:26:09
;; Version: 2.2
;; Last-Updated: 2019-07-23 17:22:07
;;           By: Andy Stewart
;; URL: http://www.emacswiki.org/emacs/download/snails-core.el
;; Keywords:

;;      * Make color along with current theme.
;;      * Quit snails if it has opened.
;;      * Add device to disable window configuration change snail frame.
;;      * Exit snails when enter to minibuffer.
;;
;; 2019/07/22
;;      * Delete other window first, make sure only one window in frame.
