Fix UI listener bug with EOF
parent
bce173d749
commit
a114819088
|
@ -3,9 +3,10 @@
|
||||||
USING: arrays assocs combinators continuations documents
|
USING: arrays assocs combinators continuations documents
|
||||||
ui.tools.workspace hashtables io io.styles kernel math
|
ui.tools.workspace hashtables io io.styles kernel math
|
||||||
math.vectors models namespaces parser prettyprint quotations
|
math.vectors models namespaces parser prettyprint quotations
|
||||||
sequences strings threads listener tuples ui.commands ui.gadgets
|
sequences sequences.lib strings threads listener tuples
|
||||||
ui.gadgets.editors ui.gadgets.presentations ui.gadgets.worlds
|
ui.commands ui.gadgets ui.gadgets.editors
|
||||||
ui.gestures definitions ;
|
ui.gadgets.presentations ui.gadgets.worlds ui.gestures
|
||||||
|
definitions ;
|
||||||
IN: ui.tools.interactor
|
IN: ui.tools.interactor
|
||||||
|
|
||||||
TUPLE: interactor
|
TUPLE: interactor
|
||||||
|
@ -97,7 +98,7 @@ M: interactor model-changed
|
||||||
[ set-interactor-continuation stop ] curry callcc1 ;
|
[ set-interactor-continuation stop ] curry callcc1 ;
|
||||||
|
|
||||||
M: interactor stream-readln
|
M: interactor stream-readln
|
||||||
[ interactor-yield ] keep interactor-finish first ;
|
[ interactor-yield ] keep interactor-finish ?first ;
|
||||||
|
|
||||||
: interactor-call ( quot interactor -- )
|
: interactor-call ( quot interactor -- )
|
||||||
dup interactor-busy? [
|
dup interactor-busy? [
|
||||||
|
|
|
@ -77,7 +77,7 @@ M: listener-operation invoke-command ( target command -- )
|
||||||
[ [ run-file ] each ] curry call-listener
|
[ [ run-file ] each ] curry call-listener
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: com-EOF ( listener -- )
|
: com-end ( listener -- )
|
||||||
listener-gadget-input interactor-eof ;
|
listener-gadget-input interactor-eof ;
|
||||||
|
|
||||||
: clear-output ( listener -- )
|
: clear-output ( listener -- )
|
||||||
|
@ -154,7 +154,7 @@ listener-gadget "toolbar" f {
|
||||||
{ f restart-listener }
|
{ f restart-listener }
|
||||||
{ T{ key-down f f "CLEAR" } clear-output }
|
{ T{ key-down f f "CLEAR" } clear-output }
|
||||||
{ T{ key-down f { C+ } "CLEAR" } clear-stack }
|
{ T{ key-down f { C+ } "CLEAR" } clear-stack }
|
||||||
{ T{ key-down f { C+ } "d" } com-EOF }
|
{ T{ key-down f { C+ } "d" } com-end }
|
||||||
{ T{ key-down f f "F1" } listener-help }
|
{ T{ key-down f f "F1" } listener-help }
|
||||||
} define-command-map
|
} define-command-map
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue