re_clear_eol(): * Find the number of characters we need to clear till the end of line * in order to make sure that we have cleared the previous contents of * the line. fx and sx is the number of characters inserted or deleted * in the first or second diff, diff is the difference between the * number of characters between the new and old line. */
| 454 | * number of characters between the new and old line. |
| 455 | */ |
| 456 | private void |
| 457 | re_clear_eol(EditLine *el, int fx, int sx, int diff) |
| 458 | { |
| 459 | |
| 460 | ELRE_DEBUG(1, (__F, "re_clear_eol sx %d, fx %d, diff %d\n", |
| 461 | sx, fx, diff)); |
| 462 | |
| 463 | if (fx < 0) |
| 464 | fx = -fx; |
| 465 | if (sx < 0) |
| 466 | sx = -sx; |
| 467 | if (fx > diff) |
| 468 | diff = fx; |
| 469 | if (sx > diff) |
| 470 | diff = sx; |
| 471 | |
| 472 | ELRE_DEBUG(1, (__F, "re_clear_eol %d\n", diff)); |
| 473 | terminal_clear_EOL(el, diff); |
| 474 | } |
| 475 | |
| 476 | /***************************************************************** |
| 477 | re_update_line() is based on finding the middle difference of each line |
no test coverage detected