Clear undos when starting a new interaction in the listener
parent
e33d827b99
commit
d651bdc4d7
|
@ -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-
|
||||
|
|
|
@ -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? [
|
||||
|
|
Loading…
Reference in New Issue