I think I fixed the command history
This commit is contained in:
parent
ccd32b461f
commit
c48ea3b152
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue