Updates the value and records it in history. Any redo history ahead of the current pointer is discarded.