write current hash when history is toggled on #934