projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2391d4
)
Fix calc tests when running noninteractively
author
Mattias Engdegård
<mattiase@acm.org>
Fri, 11 Sep 2020 10:54:00 +0000
(12:54 +0200)
committer
Mattias Engdegård
<mattiase@acm.org>
Fri, 11 Sep 2020 10:54:00 +0000
(12:54 +0200)
This error was introduced in
8e1376a39125c3ffc0484077b502444d853eca79
.
* lisp/calc/calc.el (calc--header-line): Prevent size from being negative.
lisp/calc/calc.el
patch
|
blob
|
history
diff --git
a/lisp/calc/calc.el
b/lisp/calc/calc.el
index 9b95bc149a65c07102864dfa501257b5cc9a8c5b..90789a69cd1bfa85002a074f0a85b35d631933ef 100644
(file)
--- 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)))