… | |
… | |
1531 | if (items == 3) |
1531 | if (items == 3) |
1532 | { |
1532 | { |
1533 | rc.row = SvIV (ST (1)); |
1533 | rc.row = SvIV (ST (1)); |
1534 | rc.col = SvIV (ST (2)); |
1534 | rc.col = SvIV (ST (2)); |
1535 | |
1535 | |
1536 | if (ix == 2 && rc.col == 0) |
1536 | if (ix == 2) |
1537 | { |
1537 | { |
|
|
1538 | if (rc.col == 0) |
|
|
1539 | { |
|
|
1540 | // col == 0 means end of previous line |
1538 | rc.row--; |
1541 | rc.row--; |
1539 | rc.col = THIS->ncol; |
1542 | rc.col = THIS->ncol; |
|
|
1543 | } |
|
|
1544 | else if (IN_RANGE_EXC (rc.row, THIS->top_row, THIS->nrow) |
|
|
1545 | && rc.col > ROW(rc.row).l) |
|
|
1546 | { |
|
|
1547 | // col >= length means while line and add newline |
|
|
1548 | rc.col = THIS->ncol; |
|
|
1549 | } |
1540 | } |
1550 | } |
1541 | |
1551 | |
1542 | clamp_it (rc.col, 0, THIS->ncol); |
1552 | clamp_it (rc.col, 0, THIS->ncol); |
1543 | clamp_it (rc.row, THIS->top_row, THIS->nrow - 1); |
1553 | clamp_it (rc.row, THIS->top_row, THIS->nrow - 1); |
1544 | |
1554 | |