Replace contents-modified to buffer changed event