fix for altscreen

https://savannah.gnu.org/bugs/?35757

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>