Interactor history fix

slava 2006-11-29 20:19:04 +00:00
parent 5cf77b4616
commit 7b6315b5f5
1 changed files with 7 additions and 7 deletions

View File

@ -22,15 +22,16 @@ M: interactor graft*
: interactor-input. ( string interactor -- )
interactor-output [
dup string? [
dup print-input
] [
short.
] if
dup string? [ dup print-input ] [ short. ] if
] with-stream* ;
: add-interactor-history ( str interactor -- )
over empty? [ 2drop ] [ interactor-history push-new ] if ;
: interactor-finish ( obj interactor -- )
dup editor-text over interactor-input.
[ editor-text ] keep
[ interactor-input. ] 2keep
[ add-interactor-history ] keep
dup control-model clear-doc
interactor-continuation continue-with ;
@ -52,7 +53,6 @@ M: interactor graft*
M: interactor stream-readln
[
over empty? [ 2dup interactor-history push-new ] unless
interactor-finish
] interactor-yield ;