Make sure the point is at the end of inserted text

Fix #7

Signed-off-by: Bao Haojun <hjbao@marvell.com>