From 08e8a5020c8a61ae729126855c7fe82e374c7fc3 Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Fri, 6 Dec 1991 05:25:21 +0000 Subject: [PATCH] Added a (setf (ts-stream-char-pos stream) 0) to the accept-input function so that char-pos will be reset to zero whenever the user presses enter. --- hemlock/ts-stream.lisp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hemlock/ts-stream.lisp b/hemlock/ts-stream.lisp index febc0aa2c..ad81aeaec 100644 --- a/hemlock/ts-stream.lisp +++ b/hemlock/ts-stream.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/ts-stream.lisp,v 1.1.1.9 1991/11/09 03:06:00 wlott Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/ts-stream.lisp,v 1.1.1.10 1991/12/06 05:25:21 wlott Exp $") ;;; ;;; ********************************************************************** ;;; @@ -84,7 +84,14 @@ (setf (ts-stream-current-input stream) (nconc (ts-stream-current-input stream) (list (etypecase input - (string input) + (string + (let ((newline + (position #\newline input :from-end t))) + (setf (ts-stream-char-pos stream) + (if newline + (- (length input) newline 1) + (length input))) + input)) (cons (ext:make-stream-command (car input) (cdr input))) -- GitLab