0

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?

KcFnMi
  • 5,516
  • 10
  • 62
  • 136

1 Answers1

0

Type

tput rmcup

(which assumes that vim used the terminal description to switch to the alternate screen), or

printf '\033[?1049l'

which makes fewer assumptions.

Further reading: Why doesn't the screen clear when running vi?

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
  • I tried both. Still when I release two finger click it scrolls down 3 lines. Any suggestion? Am I correct if I think this is an iTerm issue or perhaps something happened outside iTerm? I bet it was related to iTerm and re-installed it but even so, the same thing. Perhaps there is an even more inelegant solution. – KcFnMi Aug 12 '18 at 02:03