Yes, inIn the general case, you need to replay in a terminal of the same size.
You could store it along with your transcript and recreate the correct size when replaying (xterm -geometry [...] -e [...]), but that won't support resizing.
As mentioned by sendmoreinfo, you could declare a TERM that doesn't support any of these features.
If you care a lot about this, you could have your ttyrec record the terminal size and its changes by handling the SIGWINCH signal and using ioctl(STDIN_FILENO, TIOCGWINSZ, [...]). The harder part is then to correctly replay. I'll get back to you on this.
You can decide to ignore it altogether. As mentioned by sendmoreinfo, you could declare a TERM that doesn't support any of these features. Don't expect
vimorreadlineto behave in the nice ways you got used to, though.You could store it along with your transcript and recreate the correct size when replaying (eg
xterm -geometry [...] -e [...]), but resizing will break everything.If you care a lot about this and want the perfect solution, you could implement it yourself!
You could have your
ttyrecrecord the terminal size and its changes by handling theSIGWINCHsignal and usingioctl(STDIN_FILENO, TIOCGWINSZ, [...]).Your
ttyplaywould have to take care of emulating a terminal itself, and representing it within a terminal. That's tricky, but luckily there are a few projects already doing that, so you could reuse a well-established codebase.tmuxcomes to mind, for example.