Call the INPUT-BUFFER on return, thus, bring back the command history
This commit is contained in:
parent
7b9b6c3e66
commit
0adfc18986
|
@ -253,9 +253,7 @@
|
|||
(new-entry
|
||||
(make-history-entry command args viewer)))
|
||||
;; FIXME, use insert here
|
||||
(append-to-history! new-entry)
|
||||
(buffer-text-append-new-line! command-buffer)
|
||||
(paint-result/command-buffer new-entry)))
|
||||
(append-to-history! new-entry)))
|
||||
|
||||
(define (eval-command-in-scheme-mode command-line)
|
||||
(let ((viewer
|
||||
|
@ -267,9 +265,7 @@
|
|||
(new-entry
|
||||
(make-history-entry command args viewer)))
|
||||
;; #### shouldn't we use some kind of insertion here?
|
||||
(append-to-history! new-entry)
|
||||
(buffer-text-append-new-line! command-buffer)
|
||||
(paint-result/command-buffer new-entry))))
|
||||
(append-to-history! new-entry))))
|
||||
|
||||
;; #### crufty
|
||||
(define split-command-line string-tokenize)
|
||||
|
@ -280,6 +276,12 @@
|
|||
(init-windows!)
|
||||
(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
|
||||
(lambda a
|
||||
(set! active-keyboard-interrupt a)))
|
||||
|
@ -289,6 +291,8 @@
|
|||
(let loop ((ch (wait-for-input)) (c-x-pressed? #f)
|
||||
(completion-selector #f))
|
||||
|
||||
(debug-message "command-buffer " command-buffer)
|
||||
|
||||
(cond
|
||||
|
||||
;; Ctrl-x -> wait for next input
|
||||
|
@ -374,6 +378,12 @@
|
|||
(loop (wait-for-input) c-x-pressed? #f))
|
||||
|
||||
((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)
|
||||
(loop (wait-for-input) c-x-pressed? #f))
|
||||
|
||||
|
|
Loading…
Reference in New Issue