private void up() {
        if (currentRow > 0) {
            currentRow--;
        } else {
            // Unnecessary check rowOffset > 0 : done in scrollUp.
            scrollUp();
        }

        if (grid.getLineLength(currentRow + rowOffset) <= currentCol + colOffset) {

            if (colOffset > grid.getLineLength(currentRow + rowOffset)) {
                colOffset = grid.getLineLength(currentRow + rowOffset) - numberOfCols;
                if (colOffset < 0) {
                    colOffset = 0;
                    currentCol = grid.getLineLength(currentRow + rowOffset) - 1;
                } else {
                    currentCol = numberOfCols - 1;
                }
            } else {
                currentCol = grid.getLineLength(currentRow + rowOffset) - colOffset - 1;
            }
        }
    }