mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't record undo for free-threaded document changes (EA-123049 - REWA: DocumentReferenceManagerImpl.create)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package com.intellij.openapi.command.impl;
|
||||
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.command.undo.DocumentReference;
|
||||
import com.intellij.openapi.command.undo.DocumentReferenceManager;
|
||||
import com.intellij.openapi.command.undo.UndoConstants;
|
||||
@@ -88,6 +89,7 @@ public class DocumentUndoProvider implements Disposable {
|
||||
|
||||
private boolean shouldProcess(Document document) {
|
||||
if (myProject != null && myProject.isDisposed()) return false;
|
||||
if (!ApplicationManager.getApplication().isDispatchThread()) return false; // some light document
|
||||
return !UndoManagerImpl.isCopy(document) // if we don't ignore copy's events, we will receive notification
|
||||
// for the same event twice (from original document too)
|
||||
// and undo will work incorrectly
|
||||
|
||||
Reference in New Issue
Block a user