Interactor history fix
parent
5cf77b4616
commit
7b6315b5f5
|
@ -22,15 +22,16 @@ M: interactor graft*
|
||||||
|
|
||||||
: interactor-input. ( string interactor -- )
|
: interactor-input. ( string interactor -- )
|
||||||
interactor-output [
|
interactor-output [
|
||||||
dup string? [
|
dup string? [ dup print-input ] [ short. ] if
|
||||||
dup print-input
|
|
||||||
] [
|
|
||||||
short.
|
|
||||||
] if
|
|
||||||
] with-stream* ;
|
] with-stream* ;
|
||||||
|
|
||||||
|
: add-interactor-history ( str interactor -- )
|
||||||
|
over empty? [ 2drop ] [ interactor-history push-new ] if ;
|
||||||
|
|
||||||
: interactor-finish ( obj interactor -- )
|
: 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
|
dup control-model clear-doc
|
||||||
interactor-continuation continue-with ;
|
interactor-continuation continue-with ;
|
||||||
|
|
||||||
|
@ -52,7 +53,6 @@ M: interactor graft*
|
||||||
|
|
||||||
M: interactor stream-readln
|
M: interactor stream-readln
|
||||||
[
|
[
|
||||||
over empty? [ 2dup interactor-history push-new ] unless
|
|
||||||
interactor-finish
|
interactor-finish
|
||||||
] interactor-yield ;
|
] interactor-yield ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue