mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] KTIJ-36825 use auto-popup after moving caret inside lambda rather than invoking completion explicitly
^KTIJ-36825 fixed GitOrigin-RevId: 65e502bce933774c4ba48f9205497a9c19ed54bd
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8d176f31d4
commit
28b099ec22
+6
-8
@@ -3,8 +3,6 @@
|
||||
package org.jetbrains.kotlin.idea.completion.lookups.factories
|
||||
|
||||
import com.intellij.codeInsight.AutoPopupController
|
||||
import com.intellij.codeInsight.completion.CodeCompletionHandlerBase
|
||||
import com.intellij.codeInsight.completion.CompletionType
|
||||
import com.intellij.codeInsight.completion.InsertionContext
|
||||
import com.intellij.codeInsight.lookup.Lookup
|
||||
import com.intellij.codeInsight.lookup.LookupElement
|
||||
@@ -405,12 +403,12 @@ internal object FunctionInsertionHandler : QuotedNamesAwareInsertionHandler() {
|
||||
}
|
||||
|
||||
context.laterRunnable = if (insertLambda) Runnable {
|
||||
CodeCompletionHandlerBase(
|
||||
/* completionType = */ CompletionType.BASIC,
|
||||
/* invokedExplicitly = */ false,
|
||||
/* autopopup = */ true,
|
||||
/* synchronous = */ false,
|
||||
).invokeCompletion(project, editor)
|
||||
// We schedule auto-popup after moving the caret into the lambda.
|
||||
// It needs to be auto-popup rather than invoking completion manually,
|
||||
// otherwise pressing space will cause completion to insert the item, which is
|
||||
// not always wanted, see: KTIJ-36825
|
||||
AutoPopupController.getInstance(project)
|
||||
.scheduleAutoPopup(editor)
|
||||
} else Runnable {
|
||||
AutoPopupController.getInstance(project)
|
||||
.autoPopupParameterInfo(editor, offsetElement)
|
||||
|
||||
Reference in New Issue
Block a user