From ee26daf130716652548b8e3dcaa8cfe1df2e94dd Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Mon, 22 Mar 2021 11:58:52 +0100 Subject: [PATCH] surround with: no write action required to show chooser popup (IDEA-264381) GitOrigin-RevId: b9bfb49dba9192e463f4cd600c13fc9b4ec63655 --- .../template/impl/SurroundWithTemplateHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/template/impl/SurroundWithTemplateHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/template/impl/SurroundWithTemplateHandler.java index 2591fd72516d..317d541fd676 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/template/impl/SurroundWithTemplateHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/template/impl/SurroundWithTemplateHandler.java @@ -22,6 +22,11 @@ import org.jetbrains.annotations.NotNull; import java.util.*; public class SurroundWithTemplateHandler implements CodeInsightActionHandler { + @Override + public boolean startInWriteAction() { + return false; + } + @Override public void invoke(@NotNull final Project project, @NotNull final Editor editor, @NotNull PsiFile file) { if (!EditorModificationUtil.checkModificationAllowed(editor)) return;