Call the INPUT-BUFFER on return, thus, bring back the command history

This commit is contained in:
eknauel 2005-05-31 12:41:42 +00:00
parent 7b9b6c3e66
commit 0adfc18986
1 changed files with 16 additions and 6 deletions

View File

@ -253,9 +253,7 @@
(new-entry (new-entry
(make-history-entry command args viewer))) (make-history-entry command args viewer)))
;; FIXME, use insert here ;; FIXME, use insert here
(append-to-history! new-entry) (append-to-history! new-entry)))
(buffer-text-append-new-line! command-buffer)
(paint-result/command-buffer new-entry)))
(define (eval-command-in-scheme-mode command-line) (define (eval-command-in-scheme-mode command-line)
(let ((viewer (let ((viewer
@ -267,9 +265,7 @@
(new-entry (new-entry
(make-history-entry command args viewer))) (make-history-entry command args viewer)))
;; #### shouldn't we use some kind of insertion here? ;; #### shouldn't we use some kind of insertion here?
(append-to-history! new-entry) (append-to-history! new-entry))))
(buffer-text-append-new-line! command-buffer)
(paint-result/command-buffer new-entry))))
;; #### crufty ;; #### crufty
(define split-command-line string-tokenize) (define split-command-line string-tokenize)
@ -280,6 +276,12 @@
(init-windows!) (init-windows!)
(init-executables-completion-set!) (init-executables-completion-set!)
(set-process-group (pid) (pid))
(set-tty-process-group (current-input-port) (pid))
(set-interrupt-handler interrupt/tstp
(lambda a
(debug-message "SIGTSTP")))
'(set-interrupt-handler interrupt/keyboard '(set-interrupt-handler interrupt/keyboard
(lambda a (lambda a
(set! active-keyboard-interrupt a))) (set! active-keyboard-interrupt a)))
@ -289,6 +291,8 @@
(let loop ((ch (wait-for-input)) (c-x-pressed? #f) (let loop ((ch (wait-for-input)) (c-x-pressed? #f)
(completion-selector #f)) (completion-selector #f))
(debug-message "command-buffer " command-buffer)
(cond (cond
;; Ctrl-x -> wait for next input ;; Ctrl-x -> wait for next input
@ -374,6 +378,12 @@
(loop (wait-for-input) c-x-pressed? #f)) (loop (wait-for-input) c-x-pressed? #f))
((and (focus-on-command-buffer?) (= ch 10)) ((and (focus-on-command-buffer?) (= ch 10))
(input command-buffer ch)
(werase (app-window-curses-win command-window))
(print-command-buffer (app-window-curses-win command-window)
command-buffer)
(move-cursor command-buffer result-buffer)
(refresh-command-window)
(handle-return-key) (handle-return-key)
(loop (wait-for-input) c-x-pressed? #f)) (loop (wait-for-input) c-x-pressed? #f))