Undo: skip transparent changes when adding active editor to undo (IDEA-87432)

This commit is contained in:
Anton Makeev
2012-06-15 11:14:13 +02:00
parent 679e1c6bcf
commit 8797cdc948
2 changed files with 3 additions and 2 deletions
@@ -180,7 +180,7 @@ public class CommandMerger {
myForcedGlobal = true;
}
private boolean isTransparent() {
public boolean isTransparent() {
return myTransparent;
}
@@ -256,7 +256,7 @@ public class UndoManagerImpl extends UndoManager implements ProjectComponent, Ap
myCommandLevel--;
if (myCommandLevel > 0) return;
if (myProject != null && myCurrentMerger.hasActions() && !myCurrentMerger.isGlobal()) {
if (myProject != null && !myCurrentMerger.isGlobal() && myCurrentMerger.hasActions() && !myCurrentMerger.isTransparent()) {
addFocusedDocumentAsAffected();
}
@@ -270,6 +270,7 @@ public class UndoManagerImpl extends UndoManager implements ProjectComponent, Ap
PsiFile psiFile = LangDataKeys.PSI_FILE.getData(DataManager.getInstance().getDataContext());
if (psiFile == null) return;
VirtualFile file = psiFile.getVirtualFile();
if (file == null) return;