[Linedit-cvs] CVS update: src/smart-terminal.lisp src/utility-functions.lisp
Nikodemus Siivola
nsiivola at common-lisp.net
Mon Mar 1 00:08:34 UTC 2004
Update of /project/linedit/cvsroot/src
In directory common-lisp.net:/tmp/cvs-serv30332
Modified Files:
smart-terminal.lisp utility-functions.lisp
Log Message:
* Fixed bug that coused the entire line to be updated when only a
single character needed to be added.
Date: Sun Feb 29 19:08:33 2004
Author: nsiivola
Index: src/smart-terminal.lisp
diff -u src/smart-terminal.lisp:1.12 src/smart-terminal.lisp:1.13
--- src/smart-terminal.lisp:1.12 Sat Feb 28 10:13:56 2004
+++ src/smart-terminal.lisp Sun Feb 29 19:08:33 2004
@@ -86,7 +86,8 @@
(old (active-string backend))
(end (+ (length prompt) (length line))) ;; based on unmarked
(rows (find-row end columns))
- (start (min0 markup-start old-markup-start (mismatch new old)))
+ (start (min* markup-start old-markup-start
+ (mismatch new old) end))
(start-row (find-row start columns))
(start-col (find-col start columns))
(point* (+ point (length prompt)))
Index: src/utility-functions.lisp
diff -u src/utility-functions.lisp:1.7 src/utility-functions.lisp:1.8
--- src/utility-functions.lisp:1.7 Sat Feb 28 07:11:16 2004
+++ src/utility-functions.lisp Sun Feb 29 19:08:33 2004
@@ -50,6 +50,6 @@
(apply #'format *debug* format-string format-args)
(finish-output *debug*)))
-(defun min0 (&rest args)
- "Like min, except treats NILs as zeroes."
- (apply #'min (mapcar (lambda (x) (or x 0)) args)))
+(defun min* (&rest args)
+ "Like min, except ignores NILs."
+ (apply #'min (remove-if #'null args)))
More information about the linedit-cvs
mailing list