diff --git a/scheme/nuit-engine.scm b/scheme/nuit-engine.scm index 1f53a58..5b278f8 100644 --- a/scheme/nuit-engine.scm +++ b/scheme/nuit-engine.scm @@ -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))