Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bug when trying to git commit #1001

Closed
Zolton opened this issue Aug 20, 2019 · 4 comments
Closed

Bug when trying to git commit #1001

Zolton opened this issue Aug 20, 2019 · 4 comments
Labels
OutOfRange Issues relating to System.ArgumentOutOfRangeException

Comments

@Zolton
Copy link

Zolton commented Aug 20, 2019

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)

@msftrncs
Copy link
Collaborator

@Zolton, can you edit your post to include environment data (OS and PS version)? Any git related extensions installed in PowerShell such as PoshGit? If you unload PSReadLine does the problem go away immediately?

Remove-Module PSReadLine

@Zolton
Copy link
Author

Zolton commented Aug 23, 2019

Sorry to say, I'm just a newbie at this, don't know much about what's going on, I do everything through the VSCode terminal. OS is Windows 10 Pro 64-bit, VSCode plugins are Prettier, Live server, and Bracket pair colorizer.

@Zolton
Copy link
Author

Zolton commented Aug 28, 2019

Was able to replicate the issue - it occurs when jest/supertest is running. Specifically, I was running supertest/jest in a node environment, in the same terminal with a split window. While the test is running, if I typed out git commit -m ", the powershell takes the " as an enter command. Once I end the supertest, it works properly again

@daxian-dbw daxian-dbw added the OutOfRange Issues relating to System.ArgumentOutOfRangeException label Sep 11, 2019
@daxian-dbw
Copy link
Member

Fixed by #967

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
OutOfRange Issues relating to System.ArgumentOutOfRangeException
Projects
None yet
Development

No branches or pull requests

3 participants