According to MSDN on EM_SETSEL:
Edit controls: The control displays a flashing caret at the end position regardless of the relative values of start and end.
ScintillaWin.cxx in line 1672 does however respect the relative values of start and end:
if (nStart > nEnd) {
SetSelection(nEnd, nStart);
} else {
SetSelection(nStart, nEnd);
}
The if condition and the else branch can be dropped; then the code of the if branch will comply with the specification.
Committed fix as [89bb76].
Related
Commit: [89bb76]