Handbook
Glossary
compute-selection ( editor -- assoc )
Vocabulary
ui
.
gadgets
.
editors
.
private
Inputs
editor
an
object
Outputs
assoc
an
object
Definition
USING:
accessors
arrays
assocs
documents
kernel
ranges
sequences
ui.gadgets
;
IN:
ui.gadgets.editors.private
:
compute-selection
( editor -- assoc )
dup
gadget-selection?
[
[
selection-start/end
[
[
first
]
bi@
[a..b]
]
[
]
2bi
]
[
model>>
]
bi
[
[
]
2curry
]
dip
[
start/end-on-line
]
curry
[
bi
2array
]
2curry
H{
}
map>assoc
]
[
drop
f
]
if
;