… | |
… | |
1464 | line_t *line = &ROW(row); |
1464 | line_t *line = &ROW(row); |
1465 | |
1465 | |
1466 | line->touch (); |
1466 | line->touch (); |
1467 | line->is_longer (0); |
1467 | line->is_longer (0); |
1468 | |
1468 | |
|
|
1469 | // nuke wide char at beginning |
|
|
1470 | if (line->t[screen.cur.col] == NOCHAR) |
|
|
1471 | scr_kill_char (*line, screen.cur.col); |
|
|
1472 | |
1469 | switch (insdel) |
1473 | switch (insdel) |
1470 | { |
1474 | { |
1471 | case INSERT: |
1475 | case INSERT: |
1472 | line->l = min (line->l + count, ncol); |
1476 | line->l = min (line->l + count, ncol); |
|
|
1477 | |
|
|
1478 | if (line->t[screen.cur.col] == NOCHAR) |
|
|
1479 | scr_kill_char (*line, screen.cur.col); |
1473 | |
1480 | |
1474 | for (int col = ncol - 1; (col - count) >= screen.cur.col; col--) |
1481 | for (int col = ncol - 1; (col - count) >= screen.cur.col; col--) |
1475 | { |
1482 | { |
1476 | line->t[col] = line->t[col - count]; |
1483 | line->t[col] = line->t[col - count]; |
1477 | line->r[col] = line->r[col - count]; |
1484 | line->r[col] = line->r[col - count]; |
… | |
… | |
1497 | |
1504 | |
1498 | case ERASE: |
1505 | case ERASE: |
1499 | screen.cur.col += count; /* don't worry if > ncol */ |
1506 | screen.cur.col += count; /* don't worry if > ncol */ |
1500 | selection_check (1); |
1507 | selection_check (1); |
1501 | screen.cur.col -= count; |
1508 | screen.cur.col -= count; |
|
|
1509 | |
|
|
1510 | // nuke wide char after the end |
|
|
1511 | if (screen.cur.col + count < ncol && line->t[screen.cur.col + count] == NOCHAR) |
|
|
1512 | scr_kill_char (*line, screen.cur.col + count); |
1502 | |
1513 | |
1503 | scr_blank_line (*line, screen.cur.col, count, rstyle); |
1514 | scr_blank_line (*line, screen.cur.col, count, rstyle); |
1504 | break; |
1515 | break; |
1505 | |
1516 | |
1506 | case DELETE: |
1517 | case DELETE: |