[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b5fe447 1/3: Fix calc tests when running noninteractively
From: |
Mattias Engdegård |
Subject: |
master b5fe447 1/3: Fix calc tests when running noninteractively |
Date: |
Fri, 11 Sep 2020 07:15:02 -0400 (EDT) |
branch: master
commit b5fe4474804104f383b21b4dcb091d14adc9b610
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Fix calc tests when running noninteractively
This error was introduced in 8e1376a39125c3ffc0484077b502444d853eca79.
* lisp/calc/calc.el (calc--header-line): Prevent size from being negative.
---
lisp/calc/calc.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 9b95bc1..90789a6 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -1399,7 +1399,7 @@ border of the two cases."
;; fudge for trail is: -3 (added to len-long)
;; (width ) for trail
(factor (if (> width (+ len-long fudge)) len-long len-short))
- (size (/ (- width factor) 2))
+ (size (max (/ (- width factor) 2) 0))
(fill (make-string size ?-))
(pre (replace-regexp-in-string ".$" " " fill))
(post (replace-regexp-in-string "^." " " fill)))