void () { Registry.get("editor.block.caret.selection.vim-like").setValue(true, getTestRootDisposable()); initText("abcdef"); EditorTestUtil.setEditorVisibleSize(getEditor(), 1000, 1000); // enable drag testing getEditor().getSettings().setBlockCursor(true); int y = getEditor().getLineHeight() / 2; mouse().pressAtXY(3 * TEST_CHAR_WIDTH + 1, y); checkResultByText("abc<caret>def"); mouse().dragToXY(3 * TEST_CHAR_WIDTH + 1, y); checkResultByText("abc<caret>def"); mouse().dragToXY(2 * TEST_CHAR_WIDTH + 1, y); checkResultByText("ab<selection><caret>cd</selection>ef"); mouse().dragToXY(TEST_CHAR_WIDTH + 1, y); checkResultByText("a<selection><caret>bcd</selection>ef"); mouse().dragToXY(2 * TEST_CHAR_WIDTH + 1, y); checkResultByText("ab<selection><caret>cd</selection>ef"); mouse().dragToXY(3 * TEST_CHAR_WIDTH + 1, y); checkResultByText("abc<selection><caret>d</selection>ef"); mouse().dragToXY(4 * TEST_CHAR_WIDTH + 1, y); checkResultByText("abc<selection>d<caret>e</selection>f"); mouse().dragToXY(5 * TEST_CHAR_WIDTH + 1, y); checkResultByText("abc<selection>de<caret>f</selection>"); mouse().dragToXY(2 * TEST_CHAR_WIDTH + 1, y); checkResultByText("ab<selection><caret>cd</selection>ef"); mouse().dragToXY(5 * TEST_CHAR_WIDTH + 1, y); checkResultByText("abc<selection>de<caret>f</selection>"); }