Switch to the alternate screen buffer.
The shell’s scrollback is left untouched, so leaving restores exactly what the user was looking at before the program started.
pure function ansi_alt_screen_enter() result(seq) !! Switch to the alternate screen buffer. !! !! The shell's scrollback is left untouched, so leaving restores exactly !! what the user was looking at before the program started. character(len=:), allocatable :: seq seq = CSI//"?1049h" end function ansi_alt_screen_enter