Update buffer only if a stroke occured.