kdiduk / fotd

MIT License
1 stars 0 forks source link

Disable scroll on the last row #2

Closed kdiduk closed 3 years ago

kdiduk commented 3 years ago

When printing text on the last row, the screen is scrolled. This can be disabled by means if ioctl() and/or by control codes.

kdiduk commented 3 years ago

Some info about ioctl is here:

kdiduk commented 3 years ago

The following call fixes the issue: ioctl(1, IOCTL_OTERM_PAUSE, 0); However, after printing on the last row, when pressing any key the scroll still happens. One trick to avoid this is after printing on the last row, print on some other row but not the last one.