set scrollback [<lines>]
This variable determines how many lines maximum the scrollback buffer can be. The default is 1024.