From ba793f2de3a98d64c5809a45711097d8d0a4314a Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Mon, 10 Oct 2016 14:03:27 +0300 Subject: [PATCH] Emmet: close unclosed tags under transparent command (IDEA-161156) --- .../template/emmet/generators/XmlZenCodingGeneratorImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xml/impl/src/com/intellij/codeInsight/template/emmet/generators/XmlZenCodingGeneratorImpl.java b/xml/impl/src/com/intellij/codeInsight/template/emmet/generators/XmlZenCodingGeneratorImpl.java index f1053d84e6e2..f03e53f6b2a2 100644 --- a/xml/impl/src/com/intellij/codeInsight/template/emmet/generators/XmlZenCodingGeneratorImpl.java +++ b/xml/impl/src/com/intellij/codeInsight/template/emmet/generators/XmlZenCodingGeneratorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ import com.intellij.lang.ASTNode; import com.intellij.lang.Language; import com.intellij.lang.xml.XMLLanguage; import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.command.CommandProcessor; import com.intellij.openapi.editor.Document; import com.intellij.openapi.fileEditor.FileDocumentManager; import com.intellij.openapi.fileTypes.FileType; @@ -58,7 +59,7 @@ public class XmlZenCodingGeneratorImpl extends XmlZenCodingGenerator { @NotNull PsiElement context) { FileType fileType = context.getContainingFile().getFileType(); if (isTrueXml(fileType)) { - closeUnclosingTags(tag); + CommandProcessor.getInstance().runUndoTransparentAction(() -> closeUnclosingTags(tag)); } return tag.getContainingFile().getText(); }