… | |
… | |
143 | col--; |
143 | col--; |
144 | |
144 | |
145 | rend_t rend = l.r[col] & ~RS_baseattrMask; |
145 | rend_t rend = l.r[col] & ~RS_baseattrMask; |
146 | rend = SET_FONT (rend, FONTSET (rend)->find_font (' ')); |
146 | rend = SET_FONT (rend, FONTSET (rend)->find_font (' ')); |
147 | |
147 | |
148 | // found begin, nuke |
148 | // found start, nuke |
149 | do { |
149 | do { |
150 | l.t[col] = ' '; |
150 | l.t[col] = ' '; |
151 | l.r[col] = rend; |
151 | l.r[col] = rend; |
152 | col++; |
152 | col++; |
153 | } while (col < ncol && l.t[col] == NOCHAR); |
153 | } while (col < ncol && l.t[col] == NOCHAR); |
… | |
… | |
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 |
1469 | // nuke wide spanning the start |
1470 | if (line->t[screen.cur.col] == NOCHAR) |
1470 | if (line->t[screen.cur.col] == NOCHAR) |
1471 | scr_kill_char (*line, screen.cur.col); |
1471 | scr_kill_char (*line, screen.cur.col); |
1472 | |
1472 | |
1473 | switch (insdel) |
1473 | switch (insdel) |
1474 | { |
1474 | { |
… | |
… | |
1513 | |
1513 | |
1514 | scr_blank_line (*line, screen.cur.col, count, rstyle); |
1514 | scr_blank_line (*line, screen.cur.col, count, rstyle); |
1515 | break; |
1515 | break; |
1516 | |
1516 | |
1517 | case DELETE: |
1517 | case DELETE: |
1518 | { |
|
|
1519 | line->l = max (line->l - count, 0); |
1518 | line->l = max (line->l - count, 0); |
1520 | |
1519 | |
1521 | rend_t tr = line->r[ncol - 1] & (RS_fgMask | RS_bgMask | RS_baseattrMask); |
1520 | // nuke wide char spanning the end |
|
|
1521 | if (screen.cur.col + count < ncol && line->t[screen.cur.col + count] == NOCHAR) |
|
|
1522 | scr_kill_char (*line, screen.cur.col + count); |
1522 | |
1523 | |
1523 | for (int col = screen.cur.col; (col + count) < ncol; col++) |
1524 | for (int col = screen.cur.col; (col + count) < ncol; col++) |
1524 | { |
1525 | { |
1525 | line->t[col] = line->t[col + count]; |
1526 | line->t[col] = line->t[col + count]; |
1526 | line->r[col] = line->r[col + count]; |
1527 | line->r[col] = line->r[col + count]; |
1527 | } |
1528 | } |
1528 | |
1529 | |
1529 | // nuke wide char at the end |
|
|
1530 | if (line->t[screen.cur.col] == NOCHAR) |
|
|
1531 | scr_kill_char (*line, screen.cur.col); |
|
|
1532 | |
|
|
1533 | scr_blank_line (*line, ncol - count, count, tr); |
1530 | scr_blank_line (*line, ncol - count, count, |
|
|
1531 | line->r[ncol - 1] & (RS_fgMask | RS_bgMask | RS_baseattrMask)); |
1534 | |
1532 | |
1535 | if (selection.op && current_screen == selection.screen |
1533 | if (selection.op && current_screen == selection.screen |
1536 | && ROWCOL_IN_ROW_AT_OR_AFTER (selection.beg, screen.cur)) |
1534 | && ROWCOL_IN_ROW_AT_OR_AFTER (selection.beg, screen.cur)) |
1537 | { |
1535 | { |
1538 | if (selection.end.row != screen.cur.row |
1536 | if (selection.end.row != screen.cur.row |
1539 | || (screen.cur.col >= selection.beg.col - count) |
1537 | || (screen.cur.col >= selection.beg.col - count) |
1540 | || selection.end.col >= ncol) |
1538 | || selection.end.col >= ncol) |
1541 | CLEAR_SELECTION (); |
1539 | CLEAR_SELECTION (); |
1542 | else |
1540 | else |
1543 | { |
1541 | { |
1544 | /* shift selection */ |
1542 | /* shift selection */ |
1545 | selection.beg.col -= count; |
1543 | selection.beg.col -= count; |
1546 | selection.mark.col -= count; /* XXX: yes? */ |
1544 | selection.mark.col -= count; /* XXX: yes? */ |
1547 | selection.end.col -= count; |
1545 | selection.end.col -= count; |
1548 | } |
1546 | } |
1549 | } |
|
|
1550 | } |
1547 | } |
1551 | |
1548 | |
1552 | break; |
1549 | break; |
1553 | } |
1550 | } |
1554 | } |
1551 | } |