install an error handler for the execution of commands.
This commit is contained in:
parent
837bc881fa
commit
0cade47534
|
@ -175,27 +175,30 @@
|
||||||
standard-command-plugin))
|
standard-command-plugin))
|
||||||
|
|
||||||
(define (eval-command-in-command-mode command-line)
|
(define (eval-command-in-command-mode command-line)
|
||||||
(let* ((tokens (split-command-line command-line))
|
(with-fatal-error-handler*
|
||||||
(command (car tokens))
|
display-error-and-continue
|
||||||
(args (cdr tokens))
|
(lambda ()
|
||||||
(command-plugin (find-command-plugin command))
|
(let* ((tokens (split-command-line command-line))
|
||||||
(viewer
|
(command (car tokens))
|
||||||
(find/init-plugin-for-result
|
(args (cdr tokens))
|
||||||
(with-errno-handler
|
(command-plugin (find-command-plugin command))
|
||||||
((errno data)
|
(viewer
|
||||||
(else data))
|
(find/init-plugin-for-result
|
||||||
((command-plugin-evaluater command-plugin) command args))))
|
(with-errno-handler
|
||||||
(new-entry
|
((errno data)
|
||||||
(make-history-entry command args viewer)))
|
(else data))
|
||||||
;; FIXME, use insert here
|
((command-plugin-evaluater command-plugin) command args))))
|
||||||
(append-to-history! new-entry)
|
(new-entry
|
||||||
(signal-result-buffer-object-change)
|
(make-history-entry command args viewer)))
|
||||||
(obtain-lock paint-lock)
|
;; FIXME, use insert here
|
||||||
(paint-result-window new-entry)
|
(append-to-history! new-entry)
|
||||||
(refresh-result-window)
|
(signal-result-buffer-object-change)
|
||||||
(move-cursor (command-buffer) (result-buffer))
|
(obtain-lock paint-lock)
|
||||||
(refresh-command-window)
|
(paint-result-window new-entry)
|
||||||
(release-lock paint-lock)))
|
(refresh-result-window)
|
||||||
|
(move-cursor (command-buffer) (result-buffer))
|
||||||
|
(refresh-command-window)
|
||||||
|
(release-lock paint-lock)))))
|
||||||
|
|
||||||
(define (display-error-and-continue condition more)
|
(define (display-error-and-continue condition more)
|
||||||
(let ((win (app-window-curses-win (result-window))))
|
(let ((win (app-window-curses-win (result-window))))
|
||||||
|
|
Loading…
Reference in New Issue