diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2020-09-11 12:54:00 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2020-09-11 12:54:00 +0200 |
commit | b5fe4474804104f383b21b4dcb091d14adc9b610 (patch) | |
tree | ed0d8c52073bbe1d779212cb971a346d77492f54 /lisp/calc/calc.el | |
parent | e2391d486e8a97e383db2337fad6a93c2c11656a (diff) | |
download | emacs-b5fe4474804104f383b21b4dcb091d14adc9b610.tar.gz emacs-b5fe4474804104f383b21b4dcb091d14adc9b610.tar.bz2 emacs-b5fe4474804104f383b21b4dcb091d14adc9b610.zip |
Fix calc tests when running noninteractively
This error was introduced in 8e1376a39125c3ffc0484077b502444d853eca79.
* lisp/calc/calc.el (calc--header-line): Prevent size from being negative.
Diffstat (limited to 'lisp/calc/calc.el')
-rw-r--r-- | lisp/calc/calc.el | 2 |
1 files changed, 1 insertions, 1 deletions
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))) |