Assume the position is at the end when the offset has no last part
Assume the position is at the end when the offset has no last part

We get an NPE when the user cuts their entire message, and this fixes it.
matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk