Do not close speed search popup if search pattern is empty

GitOrigin-RevId: 0f97403e0e57057815da8dddefb81172cb3fa91c
This commit is contained in:
Sergey Malenkov
2021-04-06 18:34:01 +00:00
committed by intellij-monorepo-bot
parent ac95031403
commit b174109b33
2 changed files with 5 additions and 1 deletions
@@ -15,6 +15,7 @@ import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.*;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowManager;
@@ -559,7 +560,7 @@ public abstract class SpeedSearchBase<Comp extends JComponent> extends SpeedSear
}
protected void onSearchFieldUpdated(String pattern) {
if (StringUtil.isEmpty(pattern)) hidePopup();
if (Registry.is("ide.speed.search.close.when.empty") && StringUtil.isEmpty(pattern)) hidePopup();
}
protected class SearchField extends ExtendableTextField {
@@ -92,6 +92,9 @@ ide.popup.horizontal.scroll.bar.opaque.description=Disables translucent horizont
ide.list.popup.separate.next.step.button=false
ide.list.popup.separate.next.step.button.description=Show "Nest step" as separate button in list popups
ide.speed.search.close.when.empty=false
ide.speed.search.close.when.empty.description=Allows to close speed search popup if search pattern is empty
ide.recent.files.speed.search=true
ide.recent.files.speed.search.description=Allows to use speed search functionality in the Recent Files popup