Weird scrollback behavior after Vim session
- iTerm2 version: 3.0.7
- OS version: 10.11.6 (15G1004)
- ~/Library/Preferences/com.googlecode.iterm2.plist: com.googlecode.iterm2.plist
- Debug Log: link to file in Google Drive (too large to upload)
In my .vimrc file, I have set mouse=a, and scrolling with the mouse or with the keyboard always works fine while I'm in Vim. Sometimes, when I exit Vim, then scroll back in my terminal command history, I see chunks of my Vim session mixed in with my command history. This happens frequently, but it isn't perfectly reproducible. I was able to catch it while running a debug log (link to file in Google Drive attached). During my Vim session, I scrolled with both the keyboard and with the mouse. Here are some screenshots of the session captured by the debug log:
Immediately after exiting Vim session:
After scrolling up half a screen:
After scrolling up one full screen from there:
This is not a problem I ever encounter in Terminal.app. I initially switched back to Terminal.app after seeing these problems a while ago, but I really want to fix this and make iTerm2 my permanent home now that iTerm2 has the awesome shell integration capabilities.


