Closed CN-CODEGOD closed 1 month ago
@CN-CODEGOD Can you please provide the repro steps? Without them, there isn't much that we can do ... Thanks!
@CN-CODEGOD Can you please provide the repro steps? Without them, there isn't much that we can do ... Thanks!
do you know what happen .i was accidently get the bug from psreadline ,sorry i can't provide a repro step,
Thanks @CN-CODEGOD for opening the issue. However, I have to close it because there is no sufficient information for the investigation.
I'm also seeing the same thing. @daxian-dbw, I just installed the gh CLI today with winget
winget install --id GitHub.cli
Then with this code in my $profile:
kubectl completion powershell | Out-String | Invoke-Expression
flux completion powershell | Out-String | Invoke-Expression
gh completion -s powershell | Out-String | Invoke-Expression
set-alias -name tf -value terraform
set-alias -name k -value kubectl
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
when I type gh copilot
and hit tab
it throws this exception.
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 18 Keys:
g h Space c Backspace Tab Escape c o Tab p o i Backspace Backspace i Tab Tab
Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -18.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.Menu.EnsureMenuAndInputIsVisible(IConsole console, Int32 tooltipLineCount)
at Microsoft.PowerShell.PSConsoleReadLine.Menu.DrawMenu(Menu previousMenu)
at Microsoft.PowerShell.PSConsoleReadLine.PossibleCompletionsImpl(CommandCompletion completions, Boolean menuSelect)
at Microsoft.PowerShell.PSConsoleReadLine.CompleteImpl(Boolean menuSelect)
at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------
@daxian-dbw
For anyone else viewing this, my problem was with an outdated ps readline. The github actions bot here solved my problem:
Prerequisites
Exception report
Screenshot
Environment data
Steps to reproduce
typing with chinese input method
Expected behavior
null
Actual behavior
null