Created
October 25, 2017 19:30
-
-
Save suhininalex/4f36b9e68feca5060e763851b3d43fbc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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