Posted 16 years ago
by Walter Leinert
-
Hewlett Packard GmbH

Sytaxeditor v4.0.0277
Hi,
the method TextRange.IntersectsWith() seems to be implemented incorrectly.
E.g. if one range is contained within the other the result of TextRange.IntersectsWith() depends on the calling order.
range1.IntersectsWith(range2) != range2.IntersectsWith(range1).
As workaround i implemented a static utility method:
public static bool IntersectsWith(TextRange range1, TextRange range2) {
return range1.IntersectsWith(range2) || range2.IntersectsWith(range1);
}
Will this issue be fixed?
Regards, Walter
PS: i also submitted an issue ticket 2B8-10C284E6-2DA8.
Hi,
the method TextRange.IntersectsWith() seems to be implemented incorrectly.
E.g. if one range is contained within the other the result of TextRange.IntersectsWith() depends on the calling order.
range1.IntersectsWith(range2) != range2.IntersectsWith(range1).
As workaround i implemented a static utility method:
public static bool IntersectsWith(TextRange range1, TextRange range2) {
return range1.IntersectsWith(range2) || range2.IntersectsWith(range1);
}
Will this issue be fixed?
Regards, Walter
PS: i also submitted an issue ticket 2B8-10C284E6-2DA8.