Skip to content

Bug when trying to git commit #1001

Closed
Closed
@Zolton

Description

@Zolton

Environment data

Steps to reproduce or exception report

Every now and then I type
git commit -m
and as soon as I type the first quote, ", git thinks its an Enter command and throws an error

It's not sticky keys either. Aside from not having sticky keys at all on my keyboard, during the error message, I can mash ' and " as many times as I want - and powershell understands its an apostrophe or quote. But once I Ctrl + C out and try git commit again, the powershell terminal takes the first press of ' or " as Enter.
Basically, the error is only triggered once I type
git commit -m "
. All other times, powershell correctly interprets the ' or " key as apostrophe or quote.

After using git bash a few times and committing, powershell works normally again. Error message I received below:

Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Last 200 Keys:
l l Space c o n n e c t - s e s s i o n - k n e x Enter
g i t Space s a t u Backspace Backspace Backspace t a t u s Enter
g i t Space c o Backspace Backspace a d d Space . Enter
g i t i Backspace Space s t t Backspace a t u s Enter
g i t Space c o m m i t Space - m Space " Ctrl+c Ctrl+c Ctrl+c g i t Space c o m m i t Space - m Space " Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Enter
g i t Space s t a t u s Enter
g i t Space c o m m i t Space - m Space " Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c
Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c Ctrl+c g i t Space a d d Space . Enter
g i t Space c o m m i t Space - m Space "

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: left
Actual value was -1.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColo at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

Metadata

Metadata

Assignees

No one assigned

    Labels

    OutOfRangeIssues relating to System.ArgumentOutOfRangeException

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions