diff --git a/Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript b/Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript index b24dd08a36..76010a235e 100644 --- a/Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript +++ b/Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript @@ -3429,7 +3429,9 @@ command scriptFormat pScope, pDontGroup if tStart > tEnd then put tFirstSelectionOffset into tLastSelectionOffset else - put(the number of chars of line 1 to (tLine + (tSelectionLineCount - 1)) of tNewScript - the number of chars of line 1 to (tLine + (tSelectionLineCount - 1)) of tScript) into tLastSelectionOffset end if + put(the number of chars of line 1 to (tLine + (tSelectionLineCount - 1)) of tNewScript \ + - the number of chars of line 1 to (tLine + (tSelectionLineCount - 1)) of tScript) into tLastSelectionOffset + end if if tStart is not empty then if tStart > tEnd then diff --git a/notes/bugfix-22486.md b/notes/bugfix-22486.md new file mode 100644 index 0000000000..23617caa25 --- /dev/null +++ b/notes/bugfix-22486.md @@ -0,0 +1 @@ +# Fix missing return in commoneditor scriptFormat