Minor
This commit is contained in:
@@ -176,11 +176,10 @@ object KeywordCompletion {
|
|||||||
|
|
||||||
private fun PsiElement.prevLeafSkipWhitespacesAndComments(): PsiElement? {
|
private fun PsiElement.prevLeafSkipWhitespacesAndComments(): PsiElement? {
|
||||||
var leaf = prevLeaf()
|
var leaf = prevLeaf()
|
||||||
while (leaf != null) {
|
while (leaf is PsiWhiteSpace || leaf is PsiComment) {
|
||||||
if (leaf !is PsiWhiteSpace && leaf !is PsiComment) return leaf
|
|
||||||
leaf = leaf!!.prevLeaf()
|
leaf = leaf!!.prevLeaf()
|
||||||
}
|
}
|
||||||
return null
|
return leaf
|
||||||
}
|
}
|
||||||
|
|
||||||
// builds text within scope (or from the start of the file) before position element excluding almost all declarations
|
// builds text within scope (or from the start of the file) before position element excluding almost all declarations
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ class A {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun bar() {
|
fun bar() {
|
||||||
fun()
|
foo()
|
||||||
}
|
}
|
||||||
|
|
||||||
<caret>
|
<caret>
|
||||||
|
|||||||
Reference in New Issue
Block a user