From bdea695b5a26482d7a63819406a69a88c67ee6b9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Oct 2017 15:46:38 +0200 Subject: [PATCH] Fix quickrun output popups being too small There is no guarantee that the quickrun buffer will have all its output when spawned, making :autofit unpredictable; usually making them too small, so we disable :autofit and do it manually, once the output is ready. --- modules/feature/eval/config.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/feature/eval/config.el b/modules/feature/eval/config.el index ab63ac021..3f8176757 100644 --- a/modules/feature/eval/config.el +++ b/modules/feature/eval/config.el @@ -70,7 +70,7 @@ function that creates and returns the REPL buffer." (unless (boundp 'display-line-numbers) (add-hook 'quickrun--mode-hook #'nlinum-mode)) :config - (set! :popup "*quickrun*" :size 3 :autokill t :autoclose t :autofit t) + (set! :popup "*quickrun*" :size 6 :autokill t :autoclose t) (defun +eval*quickrun-auto-close (&rest _) "Allows us to silently re-run quickrun from within the quickrun buffer." @@ -85,6 +85,7 @@ function that creates and returns the REPL buffer." (defun +eval|quickrun-scroll-to-bof () "Ensures window is scrolled to BOF on invocation." (with-selected-window (get-buffer-window quickrun--buffer-name) - (goto-char (point-min)))) + (goto-char (point-min)) + (doom-popup-fit-to-buffer))) (add-hook 'quickrun-after-run-hook #'+eval|quickrun-scroll-to-bof))