Clear undos when starting a new interaction in the listener

db4
Slava Pestov 2009-01-28 12:12:03 -06:00
parent e33d827b99
commit d651bdc4d7
2 changed files with 5 additions and 4 deletions

View File

@ -22,9 +22,8 @@ TUPLE: history document elements index ;
unless-empty ;
: update-document ( history -- )
[ [ index>> ] [ elements>> ] bi nth string>> ]
[ document>> ] bi
set-doc-string ;
[ [ index>> ] [ elements>> ] bi nth string>> ] [ document>> ] bi
[ set-doc-string ] [ clear-undo drop ] 2bi ;
: change-history-index ( history i -- )
over elements>> length 1-

View File

@ -85,7 +85,9 @@ M: object (print-input)
: interactor-finish ( interactor -- )
[ history>> history-add ] keep
[ print-input ] [ clear-editor drop ] 2bi ;
[ print-input ]
[ clear-editor drop ]
[ model>> clear-undo drop ] 2tri ;
: interactor-eof ( interactor -- )
dup interactor-busy? [