From 5941a2379dbcaa22f1da3f33dbcf38662727d164 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 26 Mar 2023 09:54:29 -0400 Subject: Auto-resize minibuffer background. --- catbird/minibuffer.scm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/catbird/minibuffer.scm b/catbird/minibuffer.scm index 756b247..197b695 100644 --- a/catbird/minibuffer.scm +++ b/catbird/minibuffer.scm @@ -70,13 +70,15 @@ #:prompt %prompt))) (define-method (resize-minibuffer (minibuffer ) width) - (set! (painter (& minibuffer background)) - (with-style ((fill-color %background-color)) - (fill - (rectangle (vec2 0.0 0.0) - width - (+ (font-line-height (font (& minibuffer editor))) - (* %padding 2.0))))))) + (let ((bg (& minibuffer background))) + (set! (painter bg) + (with-style ((fill-color %background-color)) + (fill + (rectangle (vec2 0.0 0.0) + width + (+ (font-line-height (font (& minibuffer editor))) + (* %padding 2.0)))))) + (resize bg))) (define-method (clear-minibuffer (minibuffer )) (clear-line (& minibuffer editor))) -- cgit v1.2.3