diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupTypedHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupTypedHandler.java index b099d85c5f21..466b3e0dfee2 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupTypedHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupTypedHandler.java @@ -43,6 +43,7 @@ import com.intellij.openapi.editor.ex.ScrollingModelEx; import com.intellij.openapi.extensions.Extensions; import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.registry.Registry; import com.intellij.psi.PsiFile; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -230,6 +231,9 @@ public class LookupTypedHandler extends TypedHandlerDelegate { } static CharFilter.Result getLookupAction(final char charTyped, final LookupImpl lookup) { + if (!Registry.is("ide.completion.allow.finishing.by.chars")) { + return CharFilter.Result.ADD_TO_PREFIX; + } final CharFilter.Result filtersDecision = getFiltersDecision(charTyped, lookup); final LookupElement currentItem = lookup.getCurrentItem(); @@ -249,7 +253,9 @@ public class LookupTypedHandler extends TypedHandlerDelegate { } } - if (filtersDecision != null) return filtersDecision; + if (filtersDecision != null) { + return filtersDecision; + } throw new AssertionError("Typed char not handler by char filter: c=" + charTyped + "; prefix=" + currentItem + "; filters=" + Arrays.toString(getFilters())); diff --git a/platform/platform-resources-en/src/misc/registry.properties b/platform/platform-resources-en/src/misc/registry.properties index ac695573513b..70b01aa4b497 100644 --- a/platform/platform-resources-en/src/misc/registry.properties +++ b/platform/platform-resources-en/src/misc/registry.properties @@ -200,6 +200,9 @@ projectView.hide.dot.idea=true show.live.templates.in.completion=false documentation.component.editor.font=false +ide.completion.allow.finishing.by.chars=true +ide.completion.allow.finishing.by.chars.description=Controls whether typing dot, space, etc. may select the current lookup item + ide.completion.middle.matching=true # suppress inspection "UnusedProperty" ide.completion.middle.matching.description=Suggest items in completion that contain the entered string somewhere in the middle.