Marks a selection of text.
This method ignores the read-only status of the text file owning this section. It is always possible to perform a replace.
The start and end position does not have to be ordered. If the start position is after the end, the positions are switched automatically.
The text positions are automatically fixed to be within bounds.
This is the main method for all text edits.