Handbook
Glossary
change-caret ( editor quot: ( loc document -- newloc ) -- )
Factor handbook
»
UI framework
»
Building user interfaces
»
Pre-made UI gadgets
»
Editor gadgets
»
The caret and mark
Prev:
editor-mark ( editor -- loc )
Next:
change-caret&mark ( editor quot: ( loc document -- newloc ) -- )
Vocabulary
ui.gadgets.editors
Inputs
editor
an
editor
quot
a
quotation
with stack effect
( loc document -- newloc )
Outputs
None
Word description
Applies a quotation to the current caret location and moves the caret to the location output by the quotation.
See also
change-caret&mark
,
mark>caret
Definition
USING:
accessors
kernel
;
IN:
ui.gadgets.editors
:
change-caret
( editor quot: ( loc document -- newloc ) -- )
[
[
[
editor-caret
]
[
model>>
]
bi
]
dip
call
]
[
drop
]
2bi
set-caret
;
inline