[rd-editor] IJPL-192250 Do not use focus-based document reference to form undo/redo stacks

GitOrigin-RevId: 4c2c8d84b09f72d1fb319b33bae9f2994d085740
This commit is contained in:
Alexander Trushev
2025-06-18 20:01:32 +00:00
committed by intellij-monorepo-bot
parent fa0eceb82c
commit 60fa02426b
2 changed files with 3 additions and 1 deletions
@@ -184,6 +184,7 @@ final class UndoClientState implements Disposable {
currentProject = commandProject;
}
if (project != null && project == commandProject && recordOriginalReference) {
// note: originatorReference depends on FocusedComponent :sad_trombone_for_rd:, see IJPL-192250
originatorReference = UndoDocumentUtil.getDocReference(project, editorProvider);
}
}
@@ -346,7 +346,8 @@ public class UndoManagerImpl extends UndoManager {
mySharedUndoStacksHolder.trimStacks(Collections.singleton(docRef));
}
void onCommandStarted(
@ApiStatus.Internal
protected void onCommandStarted(
@Nullable Project project,
@NotNull UndoConfirmationPolicy undoConfirmationPolicy,
boolean recordOriginalReference