void () { ClientId aId = registerClient("A.id", myProject, myDisposable); ClientId bId = registerClient("B.id", myProject, myDisposable); typeWithFlush('1'); typeWithFlush('2', aId); typeWithFlush('3', bId); typeWithFlush('4'); typeWithFlush('5', aId); typeWithFlush('6', bId); checkEditorText("123456test", getFirstEditor()); // Undo in "correct" order undoFirstEditor(bId); undoFirstEditor(aId); undoFirstEditor(); undoFirstEditor(bId); undoFirstEditor(aId); undoFirstEditor(); checkEditorText("test", getFirstEditor()); // Now shared redo stack is [(old) 6, 5, 4, 3, 2, 1 (recent)] // Redo in "incorrect" order redoFirstEditor(bId); checkEditorText("3test", getFirstEditor()); redoFirstEditor(bId); checkEditorText("36test", getFirstEditor()); redoFirstEditor(aId); checkEditorText("236test", getFirstEditor()); redoFirstEditor(aId); checkEditorText("2356test", getFirstEditor()); }