From: Mattias EngdegÄrd Date: Fri, 11 Sep 2020 10:54:00 +0000 (+0200) Subject: Fix calc tests when running noninteractively X-Git-Tag: emacs-28.0.90~6130 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b5fe4474804104f383b21b4dcb091d14adc9b610;p=emacs.git Fix calc tests when running noninteractively This error was introduced in 8e1376a39125c3ffc0484077b502444d853eca79. * lisp/calc/calc.el (calc--header-line): Prevent size from being negative. --- diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 9b95bc149a6..90789a69cd1 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)))