Skip to content

Conversation

@DarlCat
Copy link
Contributor

@DarlCat DarlCat commented Dec 29, 2025

Description

The errors generated by SLua on the server reference line numbers starting from 1, not 0. This PR updates the script editor to start numbering lines at 1 when the language is Lua, LSL is unchanged by this PR and continues numbering starting from 0.

  • Line numbering updated
  • Go to line feature updated
  • Cursor position display updated
  • Script editor error view goto error updated

Screenshots

Lua error showing matching line number
Screenshot 2025-12-29 at 12 01 44 PM

LSL editing is unchanged
Screenshot 2025-12-29 at 12 02 20 PM

Showing both at the same time
Screenshot 2025-12-29 at 12 48 22 PM

Showing dynamic update when changing compiler dropdown

Screen.Recording.2025-12-29.at.12.49.39.PM.mov

Checklist

Please ensure the following before requesting review:

  • I have provided a clear title and detailed description for this pull request.
  • If useful, I have included media such as screenshots and video to show off my changes.
  • The PR is linked to a relevant issue with sufficient context.
  • I have tested the changes locally and verified they work as intended.
  • All new and existing tests pass.
  • Code follows the project's style guidelines.
  • Documentation has been updated if needed.
  • Any dependent changes have been merged and published in downstream modules
  • I have reviewed the contributing guidelines.

This is to match server-generated runtime errors that reference lines.

Signed-off-by: Darl <me@darl.cat>
@github-actions github-actions bot added the c/cpp label Dec 29, 2025
…l expectations

Existing behavior for LSL is preserved

Fixes a bug in previous commit that causes the line number shown near the bottom of the script edit floater to be off by 1 when displaying a Lua script.

Signed-off-by: Darl <me@darl.cat>
@DarlCat DarlCat changed the title Update LLScriptEditor to index line numbers from 1 when editing in Lua Update LLScriptEditor and friends to index line numbers from 1 when editing in Lua Dec 29, 2025
@akleshchev akleshchev requested a review from marchcat December 31, 2025 11:45
Copy link
Contributor

@marchcat marchcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@marchcat marchcat merged commit 732b969 into secondlife:project/lua_editor Dec 31, 2025
17 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants