ScriptEditorService autocomplete inserts at start of file when pressing Enter

Earlier today when working on my plugin I noticed that when you press enter on items that were added via ScriptEditorService:RegisterAutocompleteCallback they for some reason get inserted at the top of the file and not where your cursor is. This only happens when you press Enter, pressing Tab works as expected.

Pressing Enter (NOT WANTED!!!)
RobloxStudioBeta_VLWjBVHT7W

Pressing Tab (expected behavior)
RobloxStudioBeta_kOu7M3nEwf

This behavior can be observed by simply running the following code in the command line and pressing Enter on the autocomplete item.

game:GetService('ScriptEditorService'):RegisterAutocompleteCallback('Test', 1, function(document, request) table.insert(request.items, {label = 'foo'})  return request end)

RobloxStudioBeta_g7rKxR68Xa

This behavior has also been reported by users of my plugin, so I would really like to know if this could please be fixed or if I’m just doing something wrong!

Expected behavior

Pressing Enter should insert the text where the cursor is. Not at the top of the file.

2 Likes

Hi @NiceBuild1 the fix is in and should be released in next Studio version. Thanks for the reporting!

1 Like

Thanks for the reply!

But I would like to ask, has this supposed fix been published yet? I’ve had Roblox Studio update a few times since this reply, and this issue is still happening.

My Roblox Studio version: 0.654.2.6540482 (64bit)

The fix is in 656, and it will be released next year. Sorry for the wait!

1 Like