Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: cursor line

From: hijim:pronet at: 16-Aug-2001 22:13

Hi Anton, I'm trying to find out what line the cursor is on in a text area. The code calculates that by finding the number of lines in the area and then reducing the text to that from the cursor to the end. I can find the number of lines both times. I just can't keep the value of aa and bb from being identical. Both variables always contain the number of lines in the current text. How can I assign this number to a variable that will not change? I'd like to have this info always current, but that would mean calculating on every keystroke. Instead I have a button to update and display number of lines in the text area, number of pages that will go to the printer, and (I'm hoping) what line the cursor is on. I know the code will work if I can assign to a variable that will not change, but COPY doesn't do it. I'm sure there's a simple answer to this. Of course, a more direct method might be better. I've experimented with system/view/line-info, as you suggested, but I get nothing that seems related to the current cursor line. Thanks, Jim Anton wrote: