Here is an improved patch that fixes problems in an earlier post with incorrect cursor position when incremental redisplay was active.
It is still required that calls to with-output-as-gadget be wrapped in (updating-output ( ... :cache-value <some-constant>)) to avoid problems if the output-record is ever erased.
Happy New Year! Paul