public void selectPositionCaret (int pos)

Positions the caret to the position indicated by pos and extends the selection, if there is one. If there is no selection, then a selection is formed where the anchor is at the current caret position and the caretPosition is moved to pos.

Parameters:
pos    the position