Make sure the point is at the end of inserted text

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