Make sure the point is at the end of inserted text

Fix #7.

Signed-off-by: Bao Haojun <baohaojun@gmail.com>
Merge pull request #12 from baohaojun/master

Make sure the point is at the end of inserted text