First, sorry if the title isn't precise. I'm in a weird situation, while using Vim on Mac iTerm2. More precisely, when I release two finger click it scrolls down 3 lines.
Sort of same thing is mentioned at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683942 and its referred as "alternate screen scrolling".
How do I came in this situation? Well, I was in a remote ssh session and just just closed macbook, put it on bag and went to lunch. When I came back I experienced this strange thing.
It seems the same issue is mentioned at How can I turn off "scrolling the history" in iTerm2.
It only happens on iTerm2, not on Terminal.
So how do I go out of alternate screen?
Type
(which assumes that vim used the terminal description to switch to the alternate screen), or
which makes fewer assumptions.
Further reading: Why doesn't the screen clear when running vi?