mirror of https://gitlab.com/basile.b/dexed.git
updated range comp proc
This commit is contained in:
parent
5dd4001470
commit
fc8eed3c5a
|
@ -227,6 +227,8 @@ end;
|
||||||
function TSynD2SynRange.Compare(Range: TSynCustomHighlighterRange): integer;
|
function TSynD2SynRange.Compare(Range: TSynCustomHighlighterRange): integer;
|
||||||
var
|
var
|
||||||
src_t: TSynD2SynRange;
|
src_t: TSynD2SynRange;
|
||||||
|
const
|
||||||
|
cmpRes: array[boolean] of integer = (-1, 1);
|
||||||
begin
|
begin
|
||||||
result := inherited Compare(Range);
|
result := inherited Compare(Range);
|
||||||
if result <> 0 then exit;
|
if result <> 0 then exit;
|
||||||
|
@ -234,12 +236,13 @@ begin
|
||||||
if Range is TSynD2SynRange then
|
if Range is TSynD2SynRange then
|
||||||
begin
|
begin
|
||||||
src_t := TSynD2SynRange(Range);
|
src_t := TSynD2SynRange(Range);
|
||||||
if src_t.rangeKinds <> rangeKinds then exit(1);
|
if (src_t.rString and rString) then exit(0);
|
||||||
if src_t.nestedCommentsCount <> nestedCommentsCount then exit(1);
|
if src_t.nestedCommentsCount <> nestedCommentsCount then
|
||||||
if src_t.tokenStringBracketsCount <> tokenStringBracketsCount then exit(1);
|
exit(cmpRes[src_t.nestedCommentsCount > nestedCommentsCount]);
|
||||||
if src_t.rString <> rString then exit(1);
|
if src_t.tokenStringBracketsCount <> tokenStringBracketsCount then
|
||||||
if src_t.namedRegionCount <> namedRegionCount then exit(1);
|
exit(cmpRes[src_t.tokenStringBracketsCount > tokenStringBracketsCount]);
|
||||||
exit(0);
|
if src_t.namedRegionCount <> namedRegionCount then
|
||||||
|
exit(cmpRes[src_t.namedRegionCount > namedRegionCount]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue