void () { boolean virtualSpacesBefore = EditorSettingsExternalizable.getInstance().isVirtualSpace(); EditorSettingsExternalizable.getInstance().setVirtualSpace(true); try { doTestDeleteToStart("\n a a \n b b \n", new VisualPosition(1, 10), "\n<caret>\n b b \n", new VisualPosition(1, 0)); doTestDeleteToStart("\n a a \n b b \n", new VisualPosition(2, 10), "\n a a \n<caret>\n", new VisualPosition(2, 0)); doTestDeleteToStart("\n a a \n b b \n", new VisualPosition(3, 10), "\n a a \n b b \n<caret>", new VisualPosition(3, 0)); doTestDeleteToStart("\n a a \n b b \n", new VisualPosition(20, 10), "\n a a \n b b \n<caret>", new VisualPosition(3, 0)); doTestDeleteToEnd("\n a a \n b b \n", new VisualPosition(1, 10), "\n a a <caret> b b \n", new VisualPosition(1, 5)); // keep old behavior - not sure if it was intentional or not doTestDeleteToEnd("\n a a \n b b \n", new VisualPosition(3, 10), "\n a a \n b b \n<caret>", new VisualPosition(3, 10)); } finally { EditorSettingsExternalizable.getInstance().setVirtualSpace(virtualSpacesBefore); } }