Fix bug where cursor would move into wrong direction
Fix bug where cursor would move into wrong direction

If the cursor was positioned at the terminal's boundaries with a
non-zero offset value, it wasn't moved into the desired direction.
Instead, the line above the current one was scrolled into view.

maxzender/jv