Go-to-line actions in the Script Editor should centre the target line

Currently when you click on a print statement to go to it, or click on a find result to go to it, the target Script Editor only scrolls as little as possible to get the line onto the screen. This means that the target line will usually end up at the very top line or very bottom line of the Script Editor… which almost certainly means you have to further scroll the script editor to actually get the line to a position where you can properly look at it / manipulate it.

The behavior in most other code / text editors is to scroll such that the target line is vertically centred in the middle of the editor when it isn’t on-screen to begin with. This means that you have a consistent place to look rather than having to scan your eyes to both the top and bottom of the editor to see where the result actually is, and often don’t have to scroll it any further to do what you actually wanted to do at that site in the code.

This would be an easy quality of life improvement for the Script Editor.

15 Likes

This would be nice, but I’m not sure it’s worth the time to work on. After all, ROBLOX has a lot of things to work on, and most developers have a mouse wheel they can use to easily jump to where they want to go.

I find the “jump to line” so disorienting that I need to read the error message and find the line myself. Simple hacky fixes could be done (push the view 5 lines past the line, which won’t be centered but will be better than bottom of view).

A related improvement:
If the line with the cursor on it was highlighted (with a different shade of background or subtle borders), it would make it much easier to scan in general. This is a feature in most text editors (Sublime in number tray, VSCode & Atom with lines/shading).

Also, while on the subject of improving links in the output,

it would be nice if they worked for cloned and moved scripts.

3 Likes

Quality of life changes and fixing oversights are definitely worth the time to work on because it makes developing here easier - plus, it’s not like all of the people working on studio at Roblox work on the same things all the time. I’m sure they’re capable of doing something like this fairly easily.

1 Like

This is not a good solution—because you don’t know whether the line will be at the top or bottom of the editor, you don’t know which way to scroll to find it. The issue is mostly the inconsistency of not knowing where to look to see the line you just tried to jump to.

I think this is a good description of how I currently feel, sometimes I just check the line rather than scan up and down to the top and bottom of the script several times to figure out which place the line I want to look at is.

1 Like