From 8c9d2b71428df23a528c8a07a5d796a50d36c5c2 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Tue, 31 May 2005 13:39:40 +0000 Subject: [PATCH] Select one but last element of history to evaluate Fix call to make-standard-viewer --- scheme/nuit-engine.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scheme/nuit-engine.scm b/scheme/nuit-engine.scm index c37352c..14fb27d 100644 --- a/scheme/nuit-engine.scm +++ b/scheme/nuit-engine.scm @@ -224,14 +224,16 @@ (refresh-command-window)) (define (handle-return-key) - (let ((command-line (last (buffer-text command-buffer)))) + (let ((command-line (cadr (reverse (buffer-text command-buffer))))) (cond ((string=? command-line "") (values)) ((command-buffer-in-scheme-mode?) (eval-command-in-scheme-mode command-line)) ((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) (or (find (lambda (p) @@ -570,7 +572,7 @@ ((view-plugin-constructor view-plugin) result result-buffer))) (else - ((make-standard-viewer) result result-buffer)))) + (make-standard-viewer result result-buffer)))) ;;scroll buffer after one command was entered (define (scroll-command-buffer)