From f9b44372b35f17c396394cbcd4a9ad695d628900 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 12 Jul 2013 13:30:41 +0200 Subject: [PATCH] prevent Emmet from overriding surround template expansion by Tab (IDEA-110404) --- .../codeInsight/template/CustomTemplateCallback.java | 2 +- .../codeInsight/template/XmlLiveTemplateTest.groovy | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/template/CustomTemplateCallback.java b/platform/lang-impl/src/com/intellij/codeInsight/template/CustomTemplateCallback.java index 939573e96f33..8f6086cd5c2a 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/template/CustomTemplateCallback.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/template/CustomTemplateCallback.java @@ -130,7 +130,7 @@ public class CustomTemplateCallback { TemplateSettings settings = TemplateSettings.getInstance(); List candidates = new ArrayList(); for (TemplateImpl template : settings.getTemplates(templateKey)) { - if (!template.isDeactivated() && !template.isSelectionTemplate()) { + if (!template.isDeactivated()) { candidates.add(template); } } diff --git a/xml/tests/src/com/intellij/codeInsight/template/XmlLiveTemplateTest.groovy b/xml/tests/src/com/intellij/codeInsight/template/XmlLiveTemplateTest.groovy index c928a92a7e57..db73bb1dd610 100644 --- a/xml/tests/src/com/intellij/codeInsight/template/XmlLiveTemplateTest.groovy +++ b/xml/tests/src/com/intellij/codeInsight/template/XmlLiveTemplateTest.groovy @@ -52,5 +52,13 @@ public class XmlLiveTemplateTest extends LightCodeInsightFixtureTestCase { manager.startTemplate(myFixture.getEditor(), template); myFixture.checkResult '<' } + + public void "test insert CDATA by CD and tab"() { + myFixture.configureByText 'a.xml', '' + myFixture.type('CD\t') + myFixture.checkResult '''''' + } }