findByRange

fun Node.findByRange(range: Range, selfContained: Boolean = false): Node?

Return

the node most closely containing the given range. Null if none is found.

Parameters

range

the range where to search for nodes

selfContained

whether the starting node range contains the ranges of all its children. If true no further search will be performed in subtrees where the root node falls outside the given range. If false (default) the research will cover all nodes from the starting node to the leaves.

See also