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 f96cb1a50cacd..ea73cb30fee0f 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 @@ -184,23 +184,11 @@ private static boolean completeTillTypedCharOccurrence(char charTyped, LookupImp static CharFilter.Result getLookupAction(final char charTyped, final LookupImpl lookup) { final CharFilter.Result filtersDecision = getFiltersDecision(charTyped, lookup); - - final LookupElement currentItem = lookup.getCurrentItem(); - if (currentItem != null && charTyped != ' ') { - String postfix = lookup.getAdditionalPrefix() + charTyped; - final PrefixMatcher matcher = lookup.itemMatcher(currentItem); - for (String lookupString : currentItem.getAllLookupStrings()) { - if (lookupString.startsWith(matcher.getPrefix() + postfix)) { - return CharFilter.Result.ADD_TO_PREFIX; - } - } - } - if (filtersDecision != null) { return filtersDecision; } throw new AssertionError("Typed char not handler by char filter: c=" + charTyped + - "; prefix=" + currentItem + + "; prefix=" + lookup.getCurrentItem() + "; filters=" + Arrays.toString(getFilters())); } diff --git a/xml/impl/src/com/intellij/codeInsight/completion/XmlCharFilter.java b/xml/impl/src/com/intellij/codeInsight/completion/XmlCharFilter.java index b3371a3b04c1d..7df36a96ac683 100644 --- a/xml/impl/src/com/intellij/codeInsight/completion/XmlCharFilter.java +++ b/xml/impl/src/com/intellij/codeInsight/completion/XmlCharFilter.java @@ -88,6 +88,7 @@ public Result acceptChar(char c, final int prefixLength, final Lookup lookup) { switch(c){ case '-': case ':': + case '?': return Result.ADD_TO_PREFIX; case '/': if (isWithinTag(lookup)) {