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

[Bug 22396] fix literal "/*" in Auto Complete If Structures causing e… #2084

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,26 @@ function autoCompleteIFsAreBalanced pLineNumber, pScript
end repeat

put line 1 to tCounter of pScript into pScript

local tWorkText, tOldDelim

-- remove quoted literals
put the itemDelimiter into tOldDelim
set the itemDelimiter to quote
repeat for each line aLine in pScript
if aLine contains quote then
repeat with i = 1 to the number of items of aLine
BerndN marked this conversation as resolved.
Show resolved Hide resolved
if i mod 2 = 0 then
put empty into item i of aLine
end if
end repeat
end if
put aLine & cr after tWorkText
end repeat
delete char -1 of tWorkText
set the itemDelimiter to tOldDelim
put tWorkText into pScript


-- remove slash asterisk comments
local tBeginAsterix, tEndAsterix, tCharBegin, tCharEnd
Expand All @@ -2061,6 +2081,7 @@ function autoCompleteIFsAreBalanced pLineNumber, pScript
put offset(tBeginAsterix, pScript) into tCharBegin
if tCharBegin is 0 then exit repeat
put offset(tEndAsterix, pScript) into tCharEnd
if tCharEnd = 0 then exit repeat
delete char tCharBegin to tCharEnd of pScript
end repeat

Expand Down