Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Screwy output

May
15,047
271
This has something to do with the cursor, or with scrolling, or with timing (I have no clue). Here's a simple BTM.

Code:
@echo off

:: cursor off
echos ^e[?25l

setarray /f n[2]

set n[0]=a
set n[1]=b

do i=0 to 1
    delay 1
    echo n[%i] = %n[%i]
enddo

unsetarray n

First, make sure TCMD has scrolled and that the cursor is at the bottom (I used DIR). When I run the BTM this is what I see when it's done.

1784081219677.webp


Once I click the mouse anywhere outside TCMD the output changes to what it should have been.

1784081304420.webp


Here's a strange one. If I do either of these, it works correctly.

1. comment echos ^e[?25l
2. comment delay 1

If I put echos ^e[?25h at the end of the BTM I get a different corruption (which goes away as mentioned above).

1784081673798.webp
 
Not reproducible here with that batch file.

Difficult to tell exactly where that's appearing from your image -- do you have a status bar? Does that bleed through on the bottom appear just above the status bar?

Is this in a ConPTY or non-ConPTY window?

(And please tell me you weren't doing this in a < 80 column window!)
 
No status bar; that's this forum in the background. Conpty, yes, 130 columns. Did you ensure that TCMD was scrolling and that the prompt was at the bottom?
 
The problem goes away if I enable folding. Haven't tried 74 yet.
 
It's better with build 74, with or without folding. And the original BTM, of which it's a simplification and which uses more control sequences and @EXECARRAY, is OK too.
 
Back
Top