[REBOL] Advancing the cursor and focus.......
From: jfdutcher1958::yahoo::com at: 18-Jun-2004 11:09
Anton.....the latter of those two ideas shows great promise....consider this
interesting behavior when implemented (I added a print statement for gaining
knowledge):
The focus advances upon keying the third character for any face (it requires a second
keypress to actually place that character into the new face).
The print statement shows a face/text value of two characters and a length also of
two.......BUT...if one uses the tab key and moves through the faces (all are the same
style) the displayed text in expands to 'three' characters as the tab comes to rest on
them. Apparently the keystroke that caused the advance was 'lurking' in the background
somewhere and records itself when the tab key retouches the field.
Kind of bizarre ??
**********************************************************************
if 2 = length? face/text [
print [face/text length? face/text]
focus ctx-text/next-field face
]