Bug in Script Editor: Second Life Project Lua Editor 26.1.0.21525310258 (64bit)
in progress
SungAli Resident
This appears to be related to highlighting. It is also influenced by the amount of code in the script and by the amount of comment text. However, commenting out all preceding code, or turning it all into a very long string, can make the problem vanish. The affected scripts compile and run without unexpected errors, but it becomes difficult to edit certain lines within the editor:
Steps to reproduce: In an SLua Enabled Sim, rez a new prim. Create a new script, open it, and replace the contents with the attached script.
Note that "LLEvents" in line 14 is highlighted in green.
Attempt to select the line.
Observe that only the word "function" is highlighted.
Copy the line and paste at the bottom of the script.
Observe that the whole line is pasted.
Place the cursor at the left edge of the line and move right one character at a time with the arrow keys.
Observe that the characters "s.touch_e" are skipped as a group.
Attempt to select or erase "_end".
Depending on your method, various failures will occur.
Press End to move to the end of the line.
Observe that the visible cursor is well past the end of the line, but that backspace deletes the last character.
Note that when the line no longer represents a proper event that the line becomes normally editable.
Comment out line 12.
Observe that "LLEvents" becomes blue and the line is normally editable.
Reenable line 12 and delete line 13.
Observe the same.
So far, I have only observed this with LLEvents.touch... All 3 are affected.
In-Editor WORKAROUND: When editing an affected line, change the first keyword by adding an extra character at the beginning, such as making "LLEvents" into "xLLEvents". Edit the line as needed, then remove the extra character.
Log In
H
Harold Linden
marked this post as
in progress
H
Harold Linden
Should be fixed in the next SLua viewer update when it releases https://github.com/secondlife/viewer/pull/5593
SungAli Resident
I just confirmed that the problems still exists for me in the Second Life Project Lua Editor 26.1.0.22728916795 (64bit) build obtained from Github.
H
Harold Linden
marked this post as
under review
marchcat Are you able to repro?
marchcat
Harold Linden yes, I'm investigating this.
SungAli Resident
I see that this is still marked as Needs Info. The requested script is available at the link provided to you in Suzanna's reply to your request, https://suzanna-linn.github.io/slua/files/test.txt Is something more required?
H
Harold Linden
SungAli Resident: Sorry about that, I'll forward this along to the viewer folks!
H
Harold Linden
https://github.com/secondlife/viewer/issues/5572 is the viewer bug for this, FYI
SungAli Resident
I keep getting a message: Failed to upload. I wouldn't think the file was too big, I made it as small as I could to produce the error. Suzanna's link below works.
Also, the error seems to occur for any legit LLEvents.xxx combination.
H
Harold Linden
marked this post as
needs info
Thanks for sending this in, looks like the example script might have failed to attach?
SuzannaLinn Resident
Harold Linden Ali gave me a copy, uploading fails, submitting as text fails because it's too long, so here it is: https://suzanna-linn.github.io/slua/files/test.txt