Select one but last element of history to evaluate

Fix call to make-standard-viewer
This commit is contained in:
mainzelm 2005-05-31 13:39:40 +00:00
parent 246660a299
commit 8c9d2b7142
1 changed files with 5 additions and 3 deletions

View File

@ -224,14 +224,16 @@
(refresh-command-window)) (refresh-command-window))
(define (handle-return-key) (define (handle-return-key)
(let ((command-line (last (buffer-text command-buffer)))) (let ((command-line (cadr (reverse (buffer-text command-buffer)))))
(cond (cond
((string=? command-line "") ((string=? command-line "")
(values)) (values))
((command-buffer-in-scheme-mode?) ((command-buffer-in-scheme-mode?)
(eval-command-in-scheme-mode command-line)) (eval-command-in-scheme-mode command-line))
((command-buffer-in-command-mode?) ((command-buffer-in-command-mode?)
(eval-command-in-command-mode command-line))))) (eval-command-in-command-mode command-line))
(else
(error "Cannot handle return key" command-line)))))
(define (find-command-plugin command) (define (find-command-plugin command)
(or (find (lambda (p) (or (find (lambda (p)
@ -570,7 +572,7 @@
((view-plugin-constructor view-plugin) ((view-plugin-constructor view-plugin)
result result-buffer))) result result-buffer)))
(else (else
((make-standard-viewer) result result-buffer)))) (make-standard-viewer result result-buffer))))
;;scroll buffer after one command was entered ;;scroll buffer after one command was entered
(define (scroll-command-buffer) (define (scroll-command-buffer)