Dirty-marking mechanism for character objects to minimize text diff