       (with-current-buffer buf
         (evil-resize-window 5)
         (funcall cb)
-        ;; (yascroll-bar-mode +1)
         (setq mode-line-format nil)))
 
     (defun narf/quickrun-after-run ()

          ("*evil-registers*"      :position bottom :height 0.3 :stick t)
          ("*scratch*"             :position bottom :height 20 :stick t)
          ("*Apropos*"             :position bottom :height 40 :stick t)
          ("*quickrun*"            :position bottom :height 15 :stick t)
          ("*Backtrace*"           :position bottom :height 15 :stick t)
          ("*Flycheck errors*"     :position bottom :height 15 :stick t)
          ("^\\*[Hh]elm.*?\\*\\'"  :regexp t :position bottom :height 0.2)
          ("^\\*Org-Babel.*\\*$"   :regexp t :position bottom :height 15 :tail t)
          ;; ("^\\*org .*\\*$"        :regexp t :position bottom :height 15 :stick t)
          ("*Agenda Commands*"     :position bottom :height 0.5)
          (" *Org todo*"            :position bottom :height 5)
          ("*Org Links*"           :position bottom :height 2)
          ("^\\*CPU-Profiler-Report .+\\*$"  :regexp t :position bottom :height 0.35)
          ("*ruby*" :position bottom :height 0.3 :stick t)
          ("*ielm*" :position bottom :height 0.3 :stick t)
          ))

      "Minimalistic split-fn; leaves popwin to handle helm buffers."
      popwin:popup-window)

    (setq-default
     helm-split-window-preferred-function 'narf/helm-split-window
     helm-display-function 'popwin:pop-to-buffer)

    (defadvice helm-ag--edit-abort (around helm-ag-edit-abort-popwin-compat activate)
      (cl-letf (((symbol-function 'select-window) 'ignore)) ad-do-it))
