mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 20:39:40 -08:00
fix(pwsh): prevent text from disappearing when a tooltip is rendered
This commit is contained in:
parent
01164cfcc9
commit
95b0f99906
|
@ -110,6 +110,9 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
|
|||
$standardOut = @(Start-Utf8Process $script:OMPExecutable @("print", "tooltip", "--error=$script:ErrorCode", "--pwd=$cleanPWD", "--shell=$script:ShellName", "--pswd=$cleanPSWD", "--config=$env:POSH_THEME", "--command=$command", "--shell-version=$script:PSVersion"))
|
||||
Write-Host $standardOut -NoNewline
|
||||
$host.UI.RawUI.CursorPosition = $position
|
||||
# we need this workaround to prevent the text after cursor from disappearing when the tooltip is rendered
|
||||
[Microsoft.PowerShell.PSConsoleReadLine]::Insert(" ")
|
||||
[Microsoft.PowerShell.PSConsoleReadLine]::Undo()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue