Horizontal scrollbar doesn't get scrolled to the caret when programmingly do a backward selection by setting the Selection.StartPosition greater than Selection.EndPosition:
ActiveView.ScrollToCaretOnSelectionChange = true
ActiveView.Selection.StartPosition = new TextPosition(10, 100); // selection start at character 100 of line 10
ActiveView.Selection.EndPosition = new TextPosition(10, 0); // selection end at character 0 of line 10
After execution of above code, the caret is placed at character 0 of line 10, which is expected, but the horizontal scrollbar is scrolled to character 100 of line 10, causing the caret at character 0 of line 10 is not visible.
I would expect the horizontal scrollbar to be scrolled to the Selection.EndPosition, which is character 0 of line 10, since the caret is there.
Is this a bug or how I can workaround it?