ConsoleGuiTools
ConsoleGuiTools copied to clipboard
Terminal text is cleared after calling Out-ConsoleGridView
Prerequisites
- [x] Write a descriptive title.
- [x] Make sure you are able to repro it on the latest version
- [x] Search the existing issues.
Steps to reproduce
Hello,
I am using Out-ConsoleGridView in my PowerShell script, and I noticed that whenever I call ocgv, any text that was on my terminal before this, is wiped out, similar to calling clear-host before outputting anything selected from ocgv.
Is there any way to call ocgv and preserve the text in the terminal that was there before?
Expected behavior
Write-Host "Hello World!"
echo "123" | ocgv
Hello World!
123
Actual behavior
Write-Host "Hello World!"
echo "123" | ocgv
123
Error details
Environment data
PS C:\Oppy\AdminTools_v2> $PSVersionTable
Name Value
---- -----
PSVersion 7.5.0
PSEdition Core
GitCommitId 7.5.0
OS Microsoft Windows 10.0.20348
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
0.7.7
Visuals
No response
Interestingly, if I use -UseNetDriver parameter, it works in that the text that was on the console before calling ocgv is preserved, however this switch is not mentioned in https://github.com/PowerShell/ConsoleGuiTools/blob/main/docs/Microsoft.PowerShell.ConsoleGuiTools/Out-ConsoleGridView.md
What version of WT are you using?
@tig I am using 1.22.250204002
Same, but not actually cleared, but instead filled with an empty space (I can scroll up to what's been on terminal). -UseNetDriver also resolves this issue.
Windows Terminal
Version: 1.22.11141.0
Name Value
---- -----
PSVersion 7.5.1
PSEdition Core
GitCommitId 7.5.1
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0