select text range
fixed replace selection