Fix memory overwrite when increasing display width in mid-editing.