Problem: When TermOpen polls for enough events to use the scrollback buffer, scrollback is lost until the next terminal refresh. Solution: Allocate the scrollback buffer when it's needed.