Project: SWT
Bug 106024 Combo and Text#setSelection(int, int) does not handle start > end with SWT.SINGLE
Reported: 2005-08-04 06:27:16 | Status: resolved wontfix

I20050803-0800 In a Text widget with text "abc", the behavior of #setSelection(int, int) depends on whether the flag SWT.SINGLE is set. - with SWT.SINGLE, setSelection(3,1) sets the caret to position 3 - without SWT.SINGLE, setSelection(3,1) sets the caret to position 1 The second behavior should also apply for the SWT.SINGLE case. This would also match the documented behavior of StyledText#setSelection(int, int).

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java