diff --git a/basis/ui/tools/listener/history/history.factor b/basis/ui/tools/listener/history/history.factor index b8bca8d44f..333347dbac 100644 --- a/basis/ui/tools/listener/history/history.factor +++ b/basis/ui/tools/listener/history/history.factor @@ -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- diff --git a/basis/ui/tools/listener/listener.factor b/basis/ui/tools/listener/listener.factor index 9996b615f6..716732cec3 100644 --- a/basis/ui/tools/listener/listener.factor +++ b/basis/ui/tools/listener/listener.factor @@ -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? [