public void MoveCursorRelative(int x, int y) { LogController("MoveCursorRelative(x:" + x.ToString() + ",y:" + y.ToString() + ",vis:[" + VisibleColumns.ToString() + "," + VisibleRows.ToString() + "]" + ")"); CursorState.CurrentColumn += x; if (CursorState.CurrentColumn < 0) { CursorState.CurrentColumn = 0; } if (CursorState.CurrentColumn >= Columns) { CursorState.CurrentColumn = Columns - 1; } CursorState.CurrentRow += y; if (CursorState.CurrentRow < CursorState.ScrollTop) { CursorState.CurrentRow = CursorState.ScrollTop; } var scrollBottom = (CursorState.ScrollBottom == -1) ? Rows - 1 : CursorState.ScrollBottom; if (CursorState.CurrentRow > scrollBottom) { CursorState.CurrentRow = scrollBottom; } ChangeCount++; }