You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using a chord to insert emoji changes all emoji on the line to "??" #3371
Then use the chord. First the emoji is inserted as ?? instead of the image, after pressing a normal letter or spacebar it turns into the image. Then using the chord again, the new emoji is inserted as ?? and all previously inserted emoji (the same emoji or different ones) change to ?? until pressing a normal letter or space returns them to being emoji.
Entering emoji through Windows' emoji keyboard (WIN+.) does not change the existing emoji in a line, and inserts them directly without entering ??. Then use the chord again, the emoji entered by Windows keyboard also turn to ??.
Expected behavior
Inserting an emoji makes it appear without needing any subsequent keypress to see them; existing emoji are unchanged while this happens.
Actual behavior
Inserting an emoji shows ?? until a subsequent keypress, and all existing emoji on the line turn to ?? until the subsequent keypress changes them back.
Looking for a workaround, I tried ::InsertLineAbove('👍') which failed with an exception but after that, redoing the original chord makes enter characters properly - without the weird ?? behaviour seen above.
This sequence is repeatable:
new terminal with wt.exe running PowerShell
PS C:\> Set-PSReadLineKeyHandler -Chord 'Ctrl+y' -ScriptBlock { [Microsoft.PowerShell.PSConsoleReadLine]::Insert('😀') }
PS C:\> ?? # broken, as reported above
PS C:\> Set-PSReadLineKeyHandler -Chord 'Ctrl+y' -ScriptBlock { [Microsoft.PowerShell.PSConsoleReadLine]::InsertLineAbove('😀') }
PS C:\> An exception occurred in custom key handler, see $error for more information: Cannot find an overload for "InsertLineAbove" and the argument count: "1". # Exception when trying the chord.
PS C:\> Set-PSReadLineKeyHandler -Chord 'Ctrl+y' -ScriptBlock { [Microsoft.PowerShell.PSConsoleReadLine]::Insert('😀') }
PS C:\> 😀 now it works # no ?? behaviour anymore
Activity
HumanEquivalentUnit commentedon Jul 14, 2022
Looking for a workaround, I tried
::InsertLineAbove('👍')which failed with an exception but after that, redoing the original chord makes enter characters properly - without the weird??behaviour seen above.This sequence is repeatable:
wt.exerunning PowerShell