Open tcx4c70 opened 11 months ago
Just to be sure - is that PowerShell 7? The tab does say "Windows PowerShell", which makes me think that it's powershell 5 (powershell.exe
).
I wonder if the PSReadline version has something to do with it? FWIW, I can repro something similar (on 1.20), but slightly different. For me, vim opens only on the top half, then when I exit, everything's still in the right place, but like half the output is cleared
Just to be sure - is that PowerShell 7? The tab does say "Windows PowerShell", which makes me think that it's powershell 5 (powershell.exe).
Yes, it's PowerShell 7. I have changed the command line of "Windows PowerShell" to pwsh7 manually.
We were about to say this was a vim-specific issue, but... it doesn't reproduce in the traditional Windows console host. :thinking:
See https://github.com/MicrosoftDocs/Console-Docs/issues/302
I can't find any reference to
MaxPhysicalWindowSize
in the console docs, I may be missing something, but is there a way to set this value?The initial
COORD
inCreatePseudoConsole
and inResizePseudoConsole
seem to only take X/Y.Some programs like vim and other use it as upper bound. Upon exit, it restores the terminal modes and size, which results in the wrong one, breaking the terminal.
emph added
Windows Terminal version
1.18.2822.0
Windows build number
10.0.22631.0
Other Software
vim 9.0.2081 (installed via scoop) Power Shell 7.3.9
Steps to reproduce
Enter
:)vim -u NONE test.txt
to open vim then exit.https://github.com/microsoft/terminal/assets/16728230/0e5f2549-4caf-458c-a0f4-59c72fe617d5
It can't be reproduced if I use pwsh7 directly (without Windows Terminal), so maybe it's a problem of Windows Terminal?
Expected Behavior
After exiting vim, the cursor should be at the last line of the monitor.
Actual Behavior
After exiting vim, the cursor is in the middle of the monitor (~60th line). And
cls
will not clear the bottom half of the monitor.