From c48ea3b152189035154e15edc6749b6bdba90430 Mon Sep 17 00:00:00 2001 From: eknauel Date: Tue, 31 May 2005 12:39:57 +0000 Subject: [PATCH] I think I fixed the command history --- scheme/input-buffer.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scheme/input-buffer.scm b/scheme/input-buffer.scm index 787ee64..b0a1034 100644 --- a/scheme/input-buffer.scm +++ b/scheme/input-buffer.scm @@ -67,7 +67,9 @@ (pos-col . ,buffer-pos-col) (pos-fin-ln . ,buffer-pos-fin-ln) (pos-y . ,buffer-pos-y) - (pos-x . ,buffer-pos-x)))))) + (pos-x . ,buffer-pos-x) + (history-pos . ,buffer-history-pos) + (lines . ,(lambda (b) (length (buffer-text b))))))))) (define (buffer-text-current-line buffer) (list-ref (buffer-text buffer) @@ -85,12 +87,12 @@ ;; enter key ((= ch 10) (set-buffer-text! buffer - (append (buffer-text buffer (list "")))) + (append (buffer-text buffer) (list ""))) (set-buffer-pos-line! buffer (+ (buffer-pos-line buffer) 1)) (set-buffer-pos-col! buffer first-column) (set-buffer-history-pos! buffer - (+ (length (buffer-text buffer)) 1))) + (- (length (buffer-text buffer)) 1))) ;; backspace ((and (= ch key-backspace) (buffer-can-write buffer)