Closed mataha closed 1 year ago
For reference, here are the (relevant) contents of my AutoRun script:
for /f %%E in (
'"echo(prompt $E| "%ComSpec%" /d 2>nul"'
) do (
set/p="%%~E[?12l%%~E[1F%%~E[0J"
) <nul
What this does is turns off cursor blinking, then moves the cursor to the previous line in order to erase everything in display from the position of the cursor to the end of the screen (so that the rubbish left by escape sequences is cleared). It works fine when Terminus is opened in a view, defaults or not.
Fixed itself with a sprinkle of console magic.
The following setting controls the default size in Terminus:
With the defaults, whenever I open a default shell (in my case Windows Command Prompt) in a panel, the second line of the header message gets eaten during preprocessing of my AutoRun scripts:
Sure enough, with
"debug": true
I can see that Terminus receives ANSICSI n A
(Cursor Up) and moves the cursor one line up before erasing the contents to the end withCSI n K
:However, when both of the dimensions in the config are non-null, that doesn't happen!
What is going on here? I don't even know where to start debugging this. I've tried looking into
ensure_position()
andview_size()
hoping to stumble upon something, but to no avail.