mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Undo: skip transparent changes when adding active editor to undo (IDEA-87432)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user