void () { WriteAction.run(()-> { init(""" some<caret> text<caret> some <selection><caret>other</selection> <selection>text<caret></selection> <selection>ano<caret>ther</selection> line"""); type('A'); executeAction("EditorDelete"); mouse().clickAt(0, 1); undo(); checkResult("someA<caret>textA<caret>some A<caret>A<caret>A<caret>line"); undo(); checkResult(""" someA<caret> textA<caret> some A<caret> A<caret> A<caret> line"""); undo(); checkResult(""" some<caret> text<caret> some <selection><caret>other</selection> <selection>text<caret></selection> <selection>ano<caret>ther</selection> line"""); redo(); checkResult(""" someA<caret> textA<caret> some A<caret> A<caret> A<caret> line"""); }); }