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

[REBOL] cursor line

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

I figured out a way to get the curent line of the cursor in a text area, but I'm having trouble implementing it. I hope this is understandable. aa: length? my-area/line-list ;lines in text a: my-area/text ;text b: system/view/caret ;text from cursor to end bb: length? my-area/line-list ;length of b text if system/view/caret <> none [ my-area/text: copy b my-cursor/text: aa - bb ;cursor line ] my-area/text: a ;restore original text The problem is that aa and bb (my-area/line-list) are always the same as each other. I tried to use COPY length? my-area/line-list , but I got the error ** Script Error: copy expected value argument of type: series port bitset I need bb to retain the value of the the shortened text (from the cursor to the end). As it is now, it reverts to the values of aa when I restore the original text. How can I assign bb so it holds its value? This will work if I can solve this problem. Even at that, there's probably a more direct solution, but this will do the job. Thanks, Jim