`new_len`/`old_len` are unsigned, we should be very, very careful with subtractions. I think the reason @tarruda added it, is because if `new_len > old_len`, then `old_len - new_len` wraps around and becomes huge, therefore making the loop run for a very long time and possibly exploding the universe.

This is one of the reason I advocate using signed types of possible. Of course, size semantics are appropriate here, so the alternative solution is to be paranoid. That said, `new_len < old_len` can be hoisted out of the loop condition. I'm not saying this for performance reasons, as any compiler can see that `new_len` and `old_len` are constant in the loop.

E.g.:

```c
// If the size of the range is reducing (ie, new_len < old_len) we
// need to delete some old_len. We do this at the start, by
// repeatedly deleting line "start".
size_t to_delete = (new_len < old_len) ? (size_t)(new_len - old_len) : 0;
for (i = 0; i < to_delete; i++) {
  if (ml_delete(start, false) == FAIL) {
    set_api_error("Cannot delete line", err);
    goto cleanup;
  }
}
```