Skip to content

Instantly share code, notes, and snippets.

@suhininalex
Created October 25, 2017 19:30
Show Gist options
  • Save suhininalex/4f36b9e68feca5060e763851b3d43fbc to your computer and use it in GitHub Desktop.
Save suhininalex/4f36b9e68feca5060e763851b3d43fbc to your computer and use it in GitHub Desktop.
fun FileTextRange.intersects(other: FileTextRange, gap: Int = 0): Boolean {
return when {
file != other.file -> false
range intersects other.range -> false
else -> extendLines(1).range intersects other.range
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment