diff --git a/Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript b/Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript index 7610178cac..8f62e3ee6e 100644 --- a/Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript +++ b/Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript @@ -1680,10 +1680,10 @@ private command calculateReturnFormatting pTo, pFrom, pLine, pContinuationRequir # If the preference is not to use formatting, just return the specification of the basic # insertion of a return character. -- allow environment with no dependencies - local tAutoComplete - put __GetPreference("editor,autocomplete", true) into tAutoComplete + local tAutoFormat + put __GetPreference("editor,autoformat", true) into tAutoFormat - if not tAutoComplete then + if not tAutoFormat then put pFrom into rAt put 0 into rLength put tReturnString into rString diff --git a/Toolset/palettes/script editor/behaviors/revsemenubarbehavior.livecodescript b/Toolset/palettes/script editor/behaviors/revsemenubarbehavior.livecodescript index 6341743bcc..ccd6222d22 100644 --- a/Toolset/palettes/script editor/behaviors/revsemenubarbehavior.livecodescript +++ b/Toolset/palettes/script editor/behaviors/revsemenubarbehavior.livecodescript @@ -150,6 +150,7 @@ private command buildEditMenu pContext if revEnvironmentEditionProperty("autocomplete") then put toggleMenuItem(tab & "Autocomplete", sePrefGet("editor,providercompletion")) & return after tEdit end if + put toggleMenuItem(tab & "Autoformat", sePrefGet("editor,autoformat")) & return after tEdit put "-" & return & \ "Preferences" after tEdit @@ -477,6 +478,9 @@ private command handleEditMenuPick pItemName case "Options|Autocomplete" sePrefSet "editor,providercompletion", (not sePrefGet("editor,providercompletion")) break + case "Options|Autoformat" + sePrefSet "editor,autoformat", (not sePrefGet("editor,autoformat")) + break case "Preferences" actionShowPreferences break diff --git a/notes/bugfix-20909.md b/notes/bugfix-20909.md new file mode 100644 index 0000000000..65e0dd3db9 --- /dev/null +++ b/notes/bugfix-20909.md @@ -0,0 +1 @@ +# Fix formatting of indents in SE when autocomplete is false and autoformat is true