Minor
This commit is contained in:
@@ -194,7 +194,7 @@ abstract class CompletionSessionBase(protected val configuration: CompletionSess
|
||||
}
|
||||
|
||||
protected fun shouldRunExtensionsCompletion(): Boolean
|
||||
= configuration.completeNonImportedDeclarations || prefixMatcher.getPrefix().length() >= 3
|
||||
= configuration.completeNonImportedDeclarations || prefix.length() >= 3
|
||||
|
||||
protected fun getKotlinTopLevelCallables(): Collection<DeclarationDescriptor>
|
||||
= indicesHelper.getTopLevelCallables({ prefixMatcher.prefixMatches(it) }, reference!!.expression)
|
||||
|
||||
@@ -210,10 +210,7 @@ fun InsertionContext.isAfterDot(): Boolean {
|
||||
fun shouldCompleteThisItems(prefixMatcher: PrefixMatcher): Boolean {
|
||||
val prefix = prefixMatcher.getPrefix()
|
||||
val s = "this@"
|
||||
return if (prefix.length() > s.length())
|
||||
prefix.startsWith(s)
|
||||
else
|
||||
s.startsWith(prefix)
|
||||
return prefix.startsWith(s) || s.startsWith(prefix)
|
||||
}
|
||||
|
||||
data class ThisItemInfo(val factory: () -> LookupElement, val type: FuzzyType)
|
||||
|
||||
@@ -160,6 +160,7 @@ public class KotlinTypedHandler extends TypedHandlerDelegate {
|
||||
}
|
||||
|
||||
private static boolean endsWith(CharSequence chars, int offset, String text) {
|
||||
if (offset < text.length()) return false;
|
||||
return chars.subSequence(offset - text.length(), offset).toString().equals(text);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user