diff options
Diffstat (limited to 'platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateState.java')
-rw-r--r-- | platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateState.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateState.java b/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateState.java index ef35a213346d..516ed9118c8c 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateState.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateState.java @@ -291,12 +291,11 @@ public class TemplateState implements Disposable { LOG.assertTrue(!myStarted, "Already started"); myStarted = true; myTemplate = template; - PsiDocumentManager.getInstance(myProject).commitAllDocuments(); - myProcessor = processor; - DocumentReference[] refs = - myDocument == null ? null : new DocumentReference[]{DocumentReferenceManager.getInstance().create(myDocument)}; + DocumentReference[] refs = myDocument != null + ? new DocumentReference[]{DocumentReferenceManager.getInstance().create(myDocument)} + : null; UndoManager.getInstance(myProject).undoableActionPerformed(new BasicUndoableAction(refs) { @Override public void undo() { |