08 Jun 26
You can switch to the alternate screen using this command:
$ tput smcup
And back with:
$ tput rmcup
by ludv
1 month ago
Vi flips to the alternate screen buffer, supported by terminals. This is achieved using escape sequences.
Found by searching: restore screen after tui exit in c
by ludv
1 month ago
30 Mar 26
State machine for parsing ANSI escape sequences
29 Mar 26
A very in-depth reference of ANSI control sequences.