ui.gadgets.editors: remove unnecessary workaround, make another word infer
parent
0c77a3b3be
commit
3a611f41c7
|
@ -8,7 +8,7 @@ continuations ui.clipboards ui.commands ui.gadgets ui.gadgets.borders
|
||||||
ui.gadgets.buttons ui.gadgets.labels ui.gadgets.scrollers
|
ui.gadgets.buttons ui.gadgets.labels ui.gadgets.scrollers
|
||||||
ui.gadgets.menus ui.gadgets.wrappers ui.render ui.pens.solid
|
ui.gadgets.menus ui.gadgets.wrappers ui.render ui.pens.solid
|
||||||
ui.gadgets.line-support ui.text ui.gestures ui.baseline-alignment
|
ui.gadgets.line-support ui.text ui.gestures ui.baseline-alignment
|
||||||
math.rectangles splitting unicode.categories fonts grouping ;
|
math.rectangles splitting unicode.categories fonts grouping call ;
|
||||||
IN: ui.gadgets.editors
|
IN: ui.gadgets.editors
|
||||||
|
|
||||||
TUPLE: editor < line-gadget
|
TUPLE: editor < line-gadget
|
||||||
|
@ -413,8 +413,7 @@ editor "caret-motion" f {
|
||||||
} define-command-map
|
} define-command-map
|
||||||
|
|
||||||
: clear-editor ( editor -- )
|
: clear-editor ( editor -- )
|
||||||
#! The with-datastack is a kludge to make it infer. Stupid.
|
model>> clear-doc ;
|
||||||
model>> 1array [ clear-doc ] with-datastack drop ;
|
|
||||||
|
|
||||||
: select-all ( editor -- ) doc-elt select-elt ;
|
: select-all ( editor -- ) doc-elt select-elt ;
|
||||||
|
|
||||||
|
@ -619,7 +618,7 @@ TUPLE: action-field < field quot ;
|
||||||
[ editor>> editor-string ]
|
[ editor>> editor-string ]
|
||||||
[ editor>> clear-editor ]
|
[ editor>> clear-editor ]
|
||||||
[ quot>> ]
|
[ quot>> ]
|
||||||
tri call ;
|
tri call( string -- ) ;
|
||||||
|
|
||||||
action-field H{
|
action-field H{
|
||||||
{ T{ key-down f f "RET" } [ invoke-action-field ] }
|
{ T{ key-down f f "RET" } [ invoke-action-field ] }
|
||||||
|
|
Loading…
Reference in New Issue