MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / re_clear_eol

Function re_clear_eol

extern/editline/src/refresh.c:456–474  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

454 * number of characters between the new and old line.
455 */
456private void
457re_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

Callers 1

re_update_lineFunction · 0.85

Calls 1

terminal_clear_EOLFunction · 0.85

Tested by

no test coverage detected