@@ -351,19 +351,9 @@ $null = New-Module -Name Warp-Module -ScriptBlock {
351351 # it is set to $false.
352352 $script :commandNotFound = $false
353353
354- # Reports the user's vi preference in the 'Bootstrapped' payload even though the session's
355- # live edit mode is overridden. See Warp-Configure-PSReadLine.
356354 $script :viEditModeOverridden = $false
357355
358356 function Warp-Configure-PSReadLine {
359- # The 'Alt+1' and 'Alt+2' chords below reach PSReadLine as a bare Escape plus a digit, and
360- # a chord split across reads -- which ConPTY readily produces -- never dispatches. Emacs
361- # swallows the stray Escape, but Vi binds it to ViCommandMode, so everything Warp writes
362- # next is reinterpreted as vi edits and 'echo hello' submits as 'o hello'. Only vi is
363- # overridden, because only vi corrupts the command; the milder stray-digit damage under
364- # the 'Windows' edit mode is GH #10891. The override costs a vi user nothing they can see,
365- # since a Warpified session's keystrokes go through Warp's input editor rather than
366- # PSReadLine's, and it must precede the bindings because it resets every key handler.
367357 if ((Get-PSReadLineOption ).EditMode -eq ' Vi' ) {
368358 $script :viEditModeOverridden = $true
369359 Set-PSReadLineOption - EditMode Emacs
@@ -974,8 +964,6 @@ $null = New-Module -Name Warp-Module -ScriptBlock {
974964
975965 function Warp-Finish-Bootstrap {
976966 param ([decimal ]$rcStartTime , [decimal ]$rcEndTime )
977- # The profiles just sourced ran after the bootstrap's own Warp-Precmd, and setting the vi
978- # edit mode there unbinds Warp's chords by resetting every key handler.
979967 Warp- Configure- PSReadLine
980968
981969 # This is the closest we can get in PowerShell to a proper preexec hook. We wrap the
0 commit comments