mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
turn on middle matching in completion (IDEA-84485 Allow auto-completion by typing the middle of a word)
This commit is contained in:
+2
-1
@@ -4,6 +4,7 @@ package com.intellij.codeInsight.completion.impl;
|
||||
import com.intellij.codeInsight.CodeInsightSettings;
|
||||
import com.intellij.codeInsight.completion.PrefixMatcher;
|
||||
import com.intellij.codeInsight.lookup.LookupElement;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.codeStyle.NameUtil;
|
||||
@@ -75,7 +76,7 @@ public class CamelHumpMatcher extends PrefixMatcher {
|
||||
}
|
||||
|
||||
public static String applyMiddleMatching(String prefix) {
|
||||
if (Registry.is("ide.completion.middle.matching") && !prefix.isEmpty()) {
|
||||
if (Registry.is("ide.completion.middle.matching") && !prefix.isEmpty() && !ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
return " " + StringUtil.replace(prefix, ".", ". ").trim();
|
||||
}
|
||||
return prefix;
|
||||
|
||||
@@ -195,7 +195,7 @@ projectView.hide.dot.idea=true
|
||||
show.live.templates.in.completion=false
|
||||
documentation.component.editor.font=false
|
||||
|
||||
ide.completion.middle.matching=false
|
||||
ide.completion.middle.matching=true
|
||||
ide.completion.middle.matching.description=Suggest items in completion that contain the entered string somewhere in the middle
|
||||
|
||||
ide.goto.middle.matching=false
|
||||
|
||||
Reference in New Issue
Block a user