Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 5d28c9e

Browse files
Merge pull request #1894 from montegoulding/bugfix-20909
[[ Bug 20909 ]] Use autoformat preference for indent
2 parents 6ddf47b + 479cb22 commit 5d28c9e

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,10 +1680,10 @@ private command calculateReturnFormatting pTo, pFrom, pLine, pContinuationRequir
16801680
# If the preference is not to use formatting, just return the specification of the basic
16811681
# insertion of a return character.
16821682
-- allow environment with no dependencies
1683-
local tAutoComplete
1684-
put __GetPreference("editor,autocomplete", true) into tAutoComplete
1683+
local tAutoFormat
1684+
put __GetPreference("editor,autoformat", true) into tAutoFormat
16851685

1686-
if not tAutoComplete then
1686+
if not tAutoFormat then
16871687
put pFrom into rAt
16881688
put 0 into rLength
16891689
put tReturnString into rString

Toolset/palettes/script editor/behaviors/revsemenubarbehavior.livecodescript

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ private command buildEditMenu pContext
150150
if revEnvironmentEditionProperty("autocomplete") then
151151
put toggleMenuItem(tab & "Autocomplete", sePrefGet("editor,providercompletion")) & return after tEdit
152152
end if
153+
put toggleMenuItem(tab & "Autoformat", sePrefGet("editor,autoformat")) & return after tEdit
153154

154155
put "-" & return & \
155156
"Preferences" after tEdit
@@ -477,6 +478,9 @@ private command handleEditMenuPick pItemName
477478
case "Options|Autocomplete"
478479
sePrefSet "editor,providercompletion", (not sePrefGet("editor,providercompletion"))
479480
break
481+
case "Options|Autoformat"
482+
sePrefSet "editor,autoformat", (not sePrefGet("editor,autoformat"))
483+
break
480484
case "Preferences"
481485
actionShowPreferences
482486
break

notes/bugfix-20909.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix formatting of indents in SE when autocomplete is false and autoformat is true

0 commit comments

Comments
 (0)