Write history when goto position.