Just a quick fix to fix a bug in the ShiftDown, and add unit tests for console-wide shift functions to prevent regression. I also think it may be possible to significantly optimize the performance of these functions, but that can be done in a separate PR if anything.
Given that this is a bugfix, I wasn't sure whether you wanted it targeting develop or master. If you want master so you can release a v9 fix, I can cherry-pick my commits out or just create a second PR; the actual change to SadConsole, as opposed to the unit tests, is effectively one line.
Changes
Added unit tests for CellSurface.ShiftUp, CellSurface.ShiftDown, CellSurface.ShiftLeft, and CellSurface.ShiftRight.
Fixed but in ShiftDown which prevented it from setting the background of cells properly when wrap==false (closes #303 )
Overview
Just a quick fix to fix a bug in the
ShiftDown
, and add unit tests for console-wide shift functions to prevent regression. I also think it may be possible to significantly optimize the performance of these functions, but that can be done in a separate PR if anything.Given that this is a bugfix, I wasn't sure whether you wanted it targeting develop or master. If you want master so you can release a v9 fix, I can cherry-pick my commits out or just create a second PR; the actual change to SadConsole, as opposed to the unit tests, is effectively one line.
Changes
CellSurface.ShiftUp
,CellSurface.ShiftDown
,CellSurface.ShiftLeft
, andCellSurface.ShiftRight
.ShiftDown
which prevented it from setting the background of cells properly whenwrap==false
(closes #303 )