gui-cs / Terminal.Gui

Cross Platform Terminal UI toolkit for .NET
MIT License
9.25k stars 673 forks source link

FakeConsole throws System.IndexOutOfRangeException using SetupFakeDriverAttribute. #3475

Closed BDisp closed 2 days ago

BDisp commented 2 weeks ago

Any attempt to write to the console buffer may throw a System.IndexOutOfRangeException exception, because the SetupFakeDriver only sets the size of the Cols and Rows without updating the size of the FakeConsole buffer.

image

dodexahedron commented 2 days ago

Just copying the comment I made in the PR, for visibility:

We need to move that (the fake driver) out of the core library anyway.

But that's a relatively low-importance issue with potentially relatively high effort to refactor, so I'm kinda ambivalent as to whether that should be done before or after V2 release.