ui: format 'display-hint' output when no arguments are passed.

When display-hint is given format specifiers such as "~%" but no arguments,
it does not format the output, causing the specifiers to be visible in the
displayed text.

* guix/ui.scm (display-hint): Format output when no arguments are passed.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Antero Mejr 2023-03-16 16:11:20 +00:00 committed by Ludovic Courtès
parent d15dbdb79c
commit 2135f69dc0
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -323,7 +323,7 @@ (define colorize
;; XXX: We should arrange so that the initial indent is wider.
(parameterize ((%text-width (max 15 (- (terminal-columns) 5))))
(texi->plain-text (match arguments
(() message)
(() (format #f message))
(_ (apply format #f message
(map (match-lambda
((? string? str)