def _subtract_selection(pushed_regions, sel_regions):
    """Subtract the selections from the pushed fields."""
    for reg in pushed_regions:
        for sel in sel_regions:
            if sel.begin() <= reg.end() and sel.end() <= reg.begin():
                # yield the region from the start of the field to the selection
                if reg.begin() < sel.begin():
                    yield sublime.Region(reg.begin(), sel.begin())
                # update the region to be from the end of the selection to
                # the end of the field
                reg = sublime.Region(sel.end(), reg.end())
                # if the region is not forward, break and don't add it as field
                if not reg.a < reg.b:
                    break
        else:
            # yield the region as field
            yield reg
dataset/ETHPy150Open philippotto/Sublime-MultiEditUtils/selection_fields.py/_subtract_selection/swapped operands of `<=`