fix(pwsh): use correct ESC char for FTCS mark

This commit is contained in:
Jan De Dobbeleer 2023-05-31 08:32:25 +02:00 committed by Jan De Dobbeleer
parent e75743d40a
commit f8e72d0c05

View file

@ -185,7 +185,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
# Write FTCS_COMMAND_EXECUTED after accepting the input - it should still happen before execution
if (("::FTCS_MARKS::" -eq "true") -and $executingCommand) {
Write-Host "`e]133;C`a" -NoNewline
Write-Host "$([char]0x1b)]133;C`a" -NoNewline
}
}
Set-PSReadLineKeyHandler -Key Ctrl+c -BriefDescription 'OhMyPoshCtrlCKeyHandler' -ScriptBlock {
@ -211,7 +211,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
# Write FTCS_COMMAND_EXECUTED after accepting the input - it should still happen before execution
if ($executingCommand) {
Write-Host "`e]133;C`a" -NoNewline
Write-Host "$([char]0x1b)]133;C`a" -NoNewline
}
}
}