fix an error when emacs move region up.
fix an error when emacs move region up.

black-screen/black-screen,shockone/black-screen,vshatskyi/black-screen,railsware/upterm,railsware/upterm,shockone/black-screen,black-screen/black-screen,black-screen/black-screen,vshatskyi/black-screen,vshatskyi/black-screen,vshatskyi/black-screen