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 ;
|
unless-empty ;
|
||||||
|
|
||||||
: update-document ( history -- )
|
: update-document ( history -- )
|
||||||
[ [ index>> ] [ elements>> ] bi nth string>> ]
|
[ [ index>> ] [ elements>> ] bi nth string>> ] [ document>> ] bi
|
||||||
[ document>> ] bi
|
[ set-doc-string ] [ clear-undo drop ] 2bi ;
|
||||||
set-doc-string ;
|
|
||||||
|
|
||||||
: change-history-index ( history i -- )
|
: change-history-index ( history i -- )
|
||||||
over elements>> length 1-
|
over elements>> length 1-
|
||||||
|
|
|
@ -85,7 +85,9 @@ M: object (print-input)
|
||||||
|
|
||||||
: interactor-finish ( interactor -- )
|
: interactor-finish ( interactor -- )
|
||||||
[ history>> history-add ] keep
|
[ history>> history-add ] keep
|
||||||
[ print-input ] [ clear-editor drop ] 2bi ;
|
[ print-input ]
|
||||||
|
[ clear-editor drop ]
|
||||||
|
[ model>> clear-undo drop ] 2tri ;
|
||||||
|
|
||||||
: interactor-eof ( interactor -- )
|
: interactor-eof ( interactor -- )
|
||||||
dup interactor-busy? [
|
dup interactor-busy? [
|
||||||
|
|
Loading…
Reference in New Issue