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

Prev:map-doc-lines ( ... from to quot: ( ... line -- ... result ) -- ... results )
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 )