From 2bfe7670c27cdfd56f2624d804523e7969f52d05 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 23 Oct 2015 04:41:27 -0400 Subject: [PATCH] Quickrun+popwin integration --- core/core-quickrun.el | 10 +++++++++- core/core-ui.el | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/core/core-quickrun.el b/core/core-quickrun.el index a29fed07e..477831245 100644 --- a/core/core-quickrun.el +++ b/core/core-quickrun.el @@ -9,7 +9,15 @@ quickrun-replace-region helm-quickrun) :config - (add-to-list 'quickrun-file-alist '("\\.gvy$" . "groovy"))) + (setq quickrun-focus-p nil) + (add-to-list 'quickrun-file-alist '("\\.gvy$" . "groovy")) + + (defun narf*quickrun-close-popwin () + (when (get-buffer quickrun/buffer-name) + (quickrun/kill-quickrun-buffer) + (popwin:close-popup-window-if-necessary))) + (advice-add 'quickrun :before 'narf*quickrun-close-popwin) + (advice-add 'quickrun-region :before 'narf*quickrun-close-popwin)) (provide 'core-quickrun) ;;; core-quickrun.el ends here diff --git a/core/core-ui.el b/core/core-ui.el index 6d6641b3e..29315c3bd 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -77,7 +77,7 @@ :config (setq popwin:popup-window-height 25) (mapc (lambda (rule) (push rule popwin:special-display-config)) - '(("*quickrun*" :position bottom :height 15) + '(("*quickrun*" :position bottom :height 10 :stick t) ("*scratch*" :position bottom :height 20 :stick t :dedicated t) ("*helm-ag-edit*" :position bottom :height 20 :stick t) (help-mode :position bottom :height 15 :stick t)