1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 16:51:06 -07:00

Fix calc tests when running noninteractively

This error was introduced in 8e1376a391.

* lisp/calc/calc.el (calc--header-line): Prevent size from being negative.
This commit is contained in:
Mattias Engdegård 2020-09-11 12:54:00 +02:00
parent e2391d486e
commit b5fe447480

View file

@ -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)))