diff options
author | Julien Lepiller <julien@lepiller.eu> | 2023-11-11 11:02:07 +0100 |
---|---|---|
committer | Julien Lepiller <julien@lepiller.eu> | 2023-11-11 11:07:47 +0100 |
commit | 28ca80717da67f90a3b33491e9807a053cf09c2d (patch) | |
tree | fd9daba03d27b8b406f68f9dfd58ce75c0eb1f73 /guix/git.scm | |
parent | fd11d7fbf8e0fcc61ff764dcc0ab737971afc55a (diff) | |
download | guix-patches-28ca80717da67f90a3b33491e9807a053cf09c2d.tar guix-patches-28ca80717da67f90a3b33491e9807a053cf09c2d.tar.gz |
guix: Properly compute progress bar width.
* guix/progress.scm (progress-reporter/bar): Take font width into account to
compute progress bar width.
* guix/git.scm (show-progress): Take font width into account to compute
progress bar width.
Change-Id: I946e447c1ea7c6eb4ff805400280f39e8f1a7c02
Diffstat (limited to 'guix/git.scm')
-rw-r--r-- | guix/git.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/git.scm b/guix/git.scm index b7182305cf..4377b27e00 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -33,6 +33,8 @@ #:use-module (guix store) #:use-module (guix utils) #:use-module (guix records) + #:use-module ((guix build syscalls) + #:select (terminal-string-width)) #:use-module (guix gexp) #:autoload (guix git-download) (git-reference-url git-reference-commit git-reference-recursive?) @@ -154,7 +156,7 @@ the 'SSL_CERT_FILE' and 'SSL_CERT_DIR' environment variables." ;; TODO: Both should be handled & exposed by the PROGRESS-BAR API instead. (define width (max (- (current-terminal-columns) - (string-length label) 7) + (terminal-string-width label) 7) 3)) (define grain |