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()); // Now shared undo stack is [(old) 1, 2, 3, 4, 5, 6 (recent)] // Undo in "incorrect" order undoFirstEditor(); checkEditorText("12356test", getFirstEditor()); undoFirstEditor(); checkEditorText("2356test", getFirstEditor()); undoFirstEditor(aId); checkEditorText("236test", getFirstEditor()); undoFirstEditor(aId); checkEditorText("36test", getFirstEditor()); }