Bug in vt101 Alternate Screen Buffer?
Posted: 17 Feb 2020 01:36
Hi,
my win10 crashes reproducible by leaving the alternate screen buffer.
The alternate screen could be useful for switching between different outputs or for games, because it doesn't support scrolling/scrollbars.
My first crash sample, but only when I ask for user input.
Or even worse
This seems to work, but only until you press enter on the command line, then it closes the cmd window.
Tested with Microsoft Windows [Version 10.0.17134.1246].
These tests are so simple, I can't believe that this is a problem on all Win10 installations, else nobody can't used this ever without detecting this.
What are the results on your pc?
jeb
my win10 crashes reproducible by leaving the alternate screen buffer.
The alternate screen could be useful for switching between different outputs or for games, because it doesn't support scrolling/scrollbars.
My first crash sample, but only when I ask for user input.
Code: Select all
@echo off
setlocal
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "\e=%%E"
REM *** Enter Alternate Screen Buffer
echo %\e%[?1049h
REM *** Crashes only when set /p in the "alternate screen buffer"
REM *** The input for set /p has to be user input (Redirections works)
set /p inp=Enter to crash
REM *** Leave Alternate Screen Buffer
echo %\e%[?1049l
echo Never reached this
REM *** Other ways to wait/get user input works, like
REM *** pause
REM *** choice
REM *** xcopy %~f0 %~f0 /L /W
Or even worse
Code: Select all
@echo off
setlocal
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "\e=%%E"
REM *** Enter Alternate Screen Buffer
echo %\e%[?1049h
REM *** Leave Alternate Screen Buffer
echo %\e%[?1049l
REM *** Enter Alternate Screen Buffer
echo %\e%[?1049h
Tested with Microsoft Windows [Version 10.0.17134.1246].
These tests are so simple, I can't believe that this is a problem on all Win10 installations, else nobody can't used this ever without detecting this.
What are the results on your pc?
jeb