No, when origin mode is set, the cursor cannot move outside of the margins.
In this case, we also have to check SCROLL_TOP and SCROLL_BOTTOM.