diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-my-stuff.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/init-my-stuff.el b/lisp/init-my-stuff.el index 1c0f084..9a1bf2d 100644 --- a/lisp/init-my-stuff.el +++ b/lisp/init-my-stuff.el @@ -78,3 +78,10 @@ Position the cursor at its beginning, according to the current mode." (newline-and-indent)) (global-set-key [(shift return)] 'my/smart-open-line) + +(defun my/stop-using-minibuffer () + "Abort any minibuffer action when it loses focus." + (when (and (>= (recursion-depth) 1) (active-minibuffer-window)) + (abort-recursive-edit))) + +(add-hook 'mouse-leave-buffer-hook 'my/stop-using-minibuffer) |