# `Drafter.Render.RowDamage`
[🔗](https://github.com/jaman/drafter/blob/main/lib/drafter/render/row_damage.ex#L1)

Which cells of a terminal row changed since it was last written, as runs to rewrite
instead of the whole row.

    Drafter.Render.RowDamage.runs(previous_strip, strip)
    #=> [{4, 3}, {40, 12}]

A run is `{first_column, width}`. Runs closer than `:gap` columns apart (default `4`)
are joined, since rewriting a few unchanged cells costs less than moving the cursor
again. Where the runs would cover more than `:whole` of the row (default `0.6`), or the
two rows differ in width, the answer is `:whole` and the row is written as it is. A
wide character is never split: a run that would start or end inside one takes all of
it.

# `run`

```elixir
@type run() :: {non_neg_integer(), pos_integer()}
```

# `runs`

```elixir
@spec runs(Drafter.Draw.Strip.t(), Drafter.Draw.Strip.t(), keyword()) ::
  [run()] | :whole
```

The runs that changed from `previous` to `current`, `[]` when none did, or `:whole`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
