From 0bd55173251ce8e86785b45ea716d4ebe6309579 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 6 Aug 2012 13:00:52 +0200 Subject: [PATCH] more correct disallowing completion finishing by chars --- .../codeInsight/lookup/impl/LookupTypedHandler.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 466b3e0dfee2..ccfb88b61095 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 @@ -231,10 +231,11 @@ 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); + if (!Registry.is("ide.completion.allow.finishing.by.chars") && + filtersDecision == CharFilter.Result.SELECT_ITEM_AND_FINISH_LOOKUP) { + return CharFilter.Result.HIDE_LOOKUP; + } final LookupElement currentItem = lookup.getCurrentItem(); if (currentItem != null && charTyped != ' ') {