changeset 38621:7f4573a73075

(animate-string): Handle case that the string is longer than the window is wide.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 01 Aug 2001 08:02:45 +0000
parents fb9c902157a4
children 9412466adbca
files lisp/play/animate.el
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/play/animate.el	Tue Jul 31 14:41:14 2001 +0000
+++ b/lisp/play/animate.el	Wed Aug 01 08:02:45 2001 +0000
@@ -101,7 +101,7 @@
 			     (or hpos
 				 ;; HPOS unspecified, so compute
 				 ;; it so as to center the string.
-				 (/ (- (window-width) (length string)) 2)))))
+				 (max 0 (/ (- (window-width) (length string)) 2))))))
     (dotimes (i animate-n-steps)
       ;; Bind buffer-undo-list so it will be unchanged when we are done.
       ;; (We're going to undo all our changes anyway.)