From: teranisi Date: Sat, 11 May 2002 10:27:17 +0000 (+0000) Subject: (wl-set-string-width): Avoid using negative number for make-string. X-Git-Tag: elmo-mark-root~132 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeebc857c6ec782f1505c744f1ef96168a735432;p=elisp%2Fwanderlust.git (wl-set-string-width): Avoid using negative number for make-string. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index ab6dae6..c08e6c3 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2002-05-11 Yuuichi Teranishi + + * wl-util.el (wl-set-string-width): Avoid using negative number + for make-string. + 2002-05-10 Hiroya Murata * wl-summary.el (wl-summary-line-list-info): Revised format of the diff --git a/wl/wl-util.el b/wl/wl-util.el index 770ba7c..d9ce4c7 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -186,8 +186,9 @@ to add the result instead of white space." (setq string (truncate-string-to-width string (abs width)))) (if (= (string-width string) (abs width)) string - (let ((paddings (make-string (- (abs width) (string-width string)) - (or padding ?\ )))) + (let ((paddings (make-string + (max 0 (- (abs width) (string-width string))) + (or padding ?\ )))) (if (< width 0) (concat paddings string) (concat string paddings)))))