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

Commit 9a26a98

Browse files
Merge pull request #1927 from BerndN/patch-4
[Bug 20621] Refine indentation for some if variants
2 parents d80efa1 + d45b41c commit 9a26a98

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,16 @@ private function textFormatIndentLineRemoves pPreviousLine, pLine
431431

432432
else
433433

434-
if "then" is among the words of pPreviousLine and token -1 of pPreviousLine is not "then" and token 1 of pPreviousLine is "if" and token - 1 of pLine is "else" then
434+
if "then" is among the words of pPreviousLine and token -1 of pPreviousLine is not "then" \
435+
and "else" is among the tokens of pPreviousLine and token 1 of pPreviousLine is "if" and token -1 of pLine is "else" then
435436
return item 1 of sTextFormatKeywordMap["else"]
436437
end if
437438

439+
if "then" is among the words of pPreviousLine and token -1 of pPreviousLine is not "then" \
440+
and token 1 of pPreviousLine is "if" and token -1 of pLine is "else" then
441+
return 0
442+
end if
443+
438444
if "then" is among the words of pPreviousLine and token -1 of pPreviousLine is not "then" then
439445
return 0
440446
else

0 commit comments

Comments
 (0)