Currently XCSourceTextRange uses closed range to represend text selections and there is no way to distinguish single char selection and "insert mode" (no selection). I have an empty range in both cases (start.column == end.column), and after source editor command invoked the character is no longer selected.
As a solution we could use a half closed range to represent any selection:
start.column == 0 && end.column == 0 // no selection
start.column == 0 && end.column == 1 // one character selected
Is this the case or i've missed something?
Thanks!