[undo] IJPL-201535 Clear and repair stacks on UndoClearHistoryAction performed

GitOrigin-RevId: 0ad1e0ffbd93233b0f919786d9ee0664a61b7705
This commit is contained in:
Alexander Trushev
2026-01-15 19:53:10 +00:00
committed by intellij-monorepo-bot
parent fefd7b20af
commit e2712206e9
2 changed files with 6 additions and 1 deletions
@@ -32,7 +32,7 @@ internal class UndoClearHistoryAction : UndoHistoryAction() {
.ask(undoManager.project)
if (confirmedClear) {
super.perform(undoManager, editor)
undoManager.clearStacks(editor)
undoManager.clearAndRepairStacks(editor)
super.perform(undoManager, editor)
Notification(
"Undo/redo",
@@ -283,6 +283,11 @@ public class UndoManagerImpl extends UndoManager {
}
}
@ApiStatus.Internal
public void clearAndRepairStacks(@Nullable FileEditor editor) {
clearStacks(editor);
}
@ApiStatus.Internal
protected void undoOrRedo(@Nullable FileEditor editor, boolean isUndo) {
UndoClientState state = getClientState(editor);