Important fix: PsiFile.getParent() is PsiDirectory!

This commit is contained in:
Valentin Kipyatkov
2015-04-03 12:08:07 +03:00
parent d0637ccaf4
commit 754567af07
@@ -460,7 +460,7 @@ public fun PsiFile.elementsInRange(range: TextRange): List<PsiElement> {
.parents(withItself = true)
.first {
val parent = it.getParent()
parent == null || parent.getTextRange() !in currentRange
it is PsiFile || parent.getTextRange() !in currentRange
}
result.add(element)