Skip to content

CompletionAcceptanceBehavior

Not yet Enum

Controls how the Script Editor inserts or replaces text when an autocomplete suggestion is accepted with Enter or Tab.

Not implemented in Nova

This enum is missing from Nova. Scripts that reference it will fail.

Description

Controls how the Script Editor treats existing text after the cursor when you accept an autocomplete suggestion with Enter or Tab. Accepting a completion always replaces the typed prefix before the cursor. The active value is stored in Studio.AutocompleteAcceptanceBehavior, which defaults to CompletionAcceptanceBehavior.InsertOnEnterReplaceOnTab.

Items

Item Value Status Notes
Insert 0 Not yet Accepting a completion with either Enter or Tab inserts the suggestion without replacing existing text after the cursor.
Replace 1 Not yet Accepting a completion with either Enter or Tab replaces existing text after the cursor with the full suggestion text.
ReplaceOnEnterInsertOnTab 2 Not yet Pressing Enter replaces existing text after the cursor; pressing Tab inserts without replacing text after the cursor.
InsertOnEnterReplaceOnTab 3 Not yet Pressing Enter inserts without replacing text after the cursor; pressing Tab replaces text after the cursor. This is the default of [Studio.AutocompleteAcceptanceBehavior](../classes/Studio.md#autoco…

Roblox reference: CompletionAcceptanceBehavior