diff --git a/scheme/nuit-engine.scm b/scheme/nuit-engine.scm index 86eef89..5ea0110 100644 --- a/scheme/nuit-engine.scm +++ b/scheme/nuit-engine.scm @@ -175,27 +175,30 @@ standard-command-plugin)) (define (eval-command-in-command-mode command-line) - (let* ((tokens (split-command-line command-line)) - (command (car tokens)) - (args (cdr tokens)) - (command-plugin (find-command-plugin command)) - (viewer - (find/init-plugin-for-result - (with-errno-handler - ((errno data) - (else data)) - ((command-plugin-evaluater command-plugin) command args)))) - (new-entry - (make-history-entry command args viewer))) - ;; FIXME, use insert here - (append-to-history! new-entry) - (signal-result-buffer-object-change) - (obtain-lock paint-lock) - (paint-result-window new-entry) - (refresh-result-window) - (move-cursor (command-buffer) (result-buffer)) - (refresh-command-window) - (release-lock paint-lock))) + (with-fatal-error-handler* + display-error-and-continue + (lambda () + (let* ((tokens (split-command-line command-line)) + (command (car tokens)) + (args (cdr tokens)) + (command-plugin (find-command-plugin command)) + (viewer + (find/init-plugin-for-result + (with-errno-handler + ((errno data) + (else data)) + ((command-plugin-evaluater command-plugin) command args)))) + (new-entry + (make-history-entry command args viewer))) + ;; FIXME, use insert here + (append-to-history! new-entry) + (signal-result-buffer-object-change) + (obtain-lock paint-lock) + (paint-result-window new-entry) + (refresh-result-window) + (move-cursor (command-buffer) (result-buffer)) + (refresh-command-window) + (release-lock paint-lock))))) (define (display-error-and-continue condition more) (let ((win (app-window-curses-win (result-window))))