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
math
math.order
ranges
sequences
ui.gadgets
ui.gadgets.line-support
;
IN:
ui.gadgets.editors.private
::
compute-selection
( editor -- assoc )
editor
gadget-selection?
[
editor
selection-start/end
:>
( start end ) start
first
editor
first-visible-line
max
:>
first-row end
first
1
+
editor
last-visible-line
min
first-row
max
:>
last-row first-row last-row
[a..b)
[|
row |
row start end row editor
model>>
start/end-on-line
2array
]
H{
}
map>assoc
]
[
f
]
if
;