Document locations
Factor handbook > UI framework > Building user interfaces > Pre-made UI gadgets > Editor gadgets > Documents

Prev:each-line ( ... from to quot: ( ... line -- ... ) -- ... )
Next:Document elements


Locations in the document are represented as a line/column number pair, with both indices being zero-based. There are some words for manipulating locations:
+col ( loc n -- newloc )

+line ( loc n -- newloc )

=col ( n loc -- newloc )

=line ( n loc -- newloc )


Miscellaneous words for working with locations:
lines-equal? ( loc1 loc2 -- ? )

validate-loc ( loc document -- newloc )