[Linedit-cvs] CVS update: src/backend.lisp src/packages.lisp src/smart-terminal.lisp src/terminal.lisp src/utility-functions.lisp

Nikodemus Siivola nsiivola at common-lisp.net
Thu Mar 4 13:52:54 UTC 2004


Update of /project/linedit/cvsroot/src
In directory common-lisp.net:/tmp/cvs-serv29729

Modified Files:
	backend.lisp packages.lisp smart-terminal.lisp terminal.lisp 
	utility-functions.lisp 
Log Message:
Fix post-completion confusion.
Date: Thu Mar  4 08:52:53 2004
Author: nsiivola

Index: src/backend.lisp
diff -u src/backend.lisp:1.5 src/backend.lisp:1.6
--- src/backend.lisp:1.5	Mon Nov 24 17:56:38 2003
+++ src/backend.lisp	Thu Mar  4 08:52:53 2004
@@ -26,7 +26,8 @@
 
 (defclass backend ()
   ((ready-p :accessor backend-ready-p :initform nil)
-   (translations :reader backend-translations)))
+   (translations :reader backend-translations)
+   (start :initform 0 :accessor get-start)))
 
 (defmacro with-backend (backend &body forms)
   (with-unique-names (an-error)


Index: src/packages.lisp
diff -u src/packages.lisp:1.14 src/packages.lisp:1.15
--- src/packages.lisp:1.14	Mon Nov 24 17:56:38 2003
+++ src/packages.lisp	Thu Mar  4 08:52:53 2004
@@ -25,7 +25,7 @@
    #:linedit
    #:formedit
    #:*default-columns*
-   #:*default-lines*   
+   #:*default-lines*
    #+sbcl #:install-repl
    #+sbcl #:uninstall-repl
    ))


Index: src/smart-terminal.lisp
diff -u src/smart-terminal.lisp:1.13 src/smart-terminal.lisp:1.14
--- src/smart-terminal.lisp:1.13	Sun Feb 29 19:08:33 2004
+++ src/smart-terminal.lisp	Thu Mar  4 08:52:53 2004
@@ -25,7 +25,7 @@
   ((point-row :initform 1 :accessor point-row)
    (point-col :initform 0 :accessor point-col)
    (active-string :initform "" :accessor active-string)
-   (markup-start :initform 0 :accessor get-markup-start)))
+   (start :initform 0 :accessor get-start)))
 
 (defun set-column-address (n current)
   (if nil
@@ -74,7 +74,7 @@
 (defmethod display ((backend smart-terminal) &key prompt line point markup)
   (let* ((*terminal-io* *standard-output*)
 	 (columns (backend-columns backend))
-	 (old-markup-start (get-markup-start backend))
+	 (old-markup-start (get-start backend))
 	 (old-col (point-col backend)))
     (multiple-value-bind (marked-line markup-start)
 	(if markup
@@ -86,13 +86,13 @@
 	       (old (active-string backend))
 	       (end (+ (length prompt) (length line))) ;; based on unmarked
 	       (rows (find-row end columns))
+	       (point* (+ point (length prompt)))
+	       (point-row (find-row point* columns))
+	       (point-col (find-col point* columns))
 	       (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)))
-	       (point-row (find-row point* columns))
-	       (point-col (find-col point* columns)))
+	       (start-col (find-col start columns)))
 	  (move-up-in-column
 	   :col start-col 
 	   :up (- (point-row backend) start-row)
@@ -108,5 +108,5 @@
 	  (setf (point-row backend) point-row
 		(point-col backend) point-col
 		(active-string backend) (concat prompt line)
-		(get-markup-start backend) markup-start)
+		(get-start backend) markup-start)
 	  (force-output *terminal-io*)))))


Index: src/terminal.lisp
diff -u src/terminal.lisp:1.5 src/terminal.lisp:1.6
--- src/terminal.lisp:1.5	Thu Oct 23 11:07:08 2003
+++ src/terminal.lisp	Thu Mar  4 08:52:53 2004
@@ -144,6 +144,7 @@
   (newline backend))
 
 (defmethod newline ((backend terminal))
+  (setf (get-start backend) 0)
   (write-char #\newline)
   (write-char #\return)
   (force-output))


Index: src/utility-functions.lisp
diff -u src/utility-functions.lisp:1.8 src/utility-functions.lisp:1.9
--- src/utility-functions.lisp:1.8	Sun Feb 29 19:08:33 2004
+++ src/utility-functions.lisp	Thu Mar  4 08:52:53 2004
@@ -45,6 +45,13 @@
   (and (< index (length string)) 
        (word-delimiter-p (char string index))))
 
+(defun start-debug (pathname &rest open-args)
+  (setf *debug* (apply #'open pathname :direction :output open-args)))
+
+(defun end-debug ()
+  (close *debug*)
+  (setf *debug* nil))
+
 (defun dbg (format-string &rest format-args)
   (when *debug*
     (apply #'format *debug* format-string format-args)
@@ -53,3 +60,5 @@
 (defun min* (&rest args)
   "Like min, except ignores NILs."
   (apply #'min (remove-if #'null args)))
+
+	
\ No newline at end of file





More information about the linedit-cvs mailing list