Try to fix SynEdit's double minus comment bug. http://www.heidisql.com/forum.php?t=15621

This commit is contained in:
Ansgar Becker
2014-06-16 18:13:50 +00:00
parent f280a1f233
commit 8aa3e82cd8

View File

@ -1198,7 +1198,7 @@ begin
Result := 0;
while IsIdentChar(Str^) do
begin
FoundDoubleMinus := (Str^ = '-') and ((Str + 1)^ = '-');
FoundDoubleMinus := (Str^ = '-') and ((Str + 1)^ = '-') and ((Str + 2)^ = ' ');
if FoundDoubleMinus then Break;
{$IFOPT Q-}
Result := 2 * Result + GetOrd;
@ -1409,7 +1409,7 @@ begin
else
while IsIdentChar(fLine[Run]) do
begin
FoundDoubleMinus := (fLine[Run] = '-') and (fLine[Run + 1] = '-');
FoundDoubleMinus := (fLine[Run] = '-') and (fLine[Run + 1] = '-') and (fLine[Run + 2] = ' ');
if FoundDoubleMinus then Break;
inc(Run);
end;
@ -1657,7 +1657,7 @@ begin
fTokenID := tkVariable;
i := Run;
repeat
FoundDoubleMinus := (fLine[i] = '-') and (fLine[i + 1] = '-');
FoundDoubleMinus := (fLine[i] = '-') and (fLine[i + 1] = '-') and (fLine[i + 2] = ' ');
if FoundDoubleMinus then Break;
Inc(i);
until not IsIdentChar(fLine[i]);