This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Left's profile picture

term.scroll()

Started by Left, 11 March 2013 - 05:55 PM
Left #1
Posted 11 March 2013 - 06:55 PM
Im developing a new (unreleased) program and I need a little bit of help with term.scroll. There is next to nothing on the wiki http://www.computercraft.info/wiki/index.php?title=Term.scroll do you guys know anything about it?
Lyqyd #2
Posted 11 March 2013 - 07:00 PM
The wiki about covers it, actually. term.scroll(1) would shift all of the lines of the terminal up one, discarding the top row. term.scroll(2) would do the same, but move everything up two lines. term.scroll(-1) pushes everything down a line and adds a blank line at the top, if I recall correctly.
Doyle3694 #3
Posted 12 March 2013 - 03:10 AM
It should be noticed that it only goes upwards, the code

term.scroll(1)
term.scroll(-1)
will remove the uppermost line and leave everything else the exact same. Which means that every piece of data that goes past the top of the terminal is lost forever