Project: SWT
Bug 139647 StyledText.getOffsetAtLocation can't return offset at end of a line
Reported: 2006-05-01 20:51:35 | Status: resolved fixed

It doesn't seem like StyledText.getOffsetAtLocation is able to return an offset corresponding to the end of a line. This is unfortunate, because for any offset corresponding to the end of a line styledText.getOffsetAtLocation (styledText.getLocationAtOffset()) is not an identity transformation. This also appears to prevent the StyledTextDragAndDropEffect class from positioning the cursor at the end of a line for a drop.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java