On rewind, set the end of the buffer to NUL.