Description
Originally in PowerShell/PSReadLine#1042
System Details
System Details Output
### VSCode version: 1.38.1 b37e54c98e1a74ba89e03073e5a3761284e3ffb0 x64
### VSCode extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
### PSES version: 2.0.0.0
### PowerShell version:
Name Value
---- -----
PSVersion 7.0.0-preview.3
PSEdition Core
GitCommitId 7.0.0-preview.3
OS Microsoft Windows 10.0.18980
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
FYI, only the preview version is enabled. VS Code indicates that the non preview version is not actually installed.
From PSReadLine:
PS version: 7.0.0-preview.3
PSReadline version: 2.0.0-beta4
os: 10.0.18975.1000 (WinBuild.160101.0800)
PS file version: 7.0.0.0
BufferWidth: 174
BufferHeight: 25
This is actually a build of PSReadLine using PR PowerShell/PSReadLine#979
Steps to reproduce
Using the Integrated PowerShell Console in VS Code's terminal (currently 1.38.1 Stable and Nightly) enter commands until the buffer (screen) is full. At that time, every command entered seems to receive a blank line immediately after the last line of the command, before the results or next prompt appears. This can be demonstrated with a blank command entry.
This does not happen with the normal Windows console, nor does this happen if I switch to CMD in a Integrated PowerShell Console session, inside VS Code's terminal.
It would seem that when PSReadLine is enabled, an additional step is occurring that causes the extra line feed, only when the cursor is already at the bottom of the buffer. If PSReadLine support is disabled (pasting scripts become more difficult), the issue goes away.
This does not happen in the regular VS Code terminal when PowerShell is the shell, regardless of PSReadLine.