I have a split window with two buffers visible, and the top one is active and maximized using CTRL+w
, UNDERSCORE
(i.e., SHIFT+Minus
).
I put the cursor in the middle of the visible buffer, or at the bottom.
Then, I CTRL+w
, j
, to activate the split on the bottom, and CTRL+w
, UNDERSCORE
to maximize it. So far, so good.
Now, I go back up to the top split using CTRL+w
, k
. Again, all good so far.
Finally, I CTRL+w
, UNDERSCORE
and the buffer maximizes, but now the file has been scrolled (compared to how it looked the last time I was looking at this same buffer in maximized state) such that the cursor is now on the first visible line.
That is to say, the cursor is on the same line of the buffer that it was before, but the contents of the buffer have moved up in the viewport so that the cursor is now at the TOP of the viewport. When I last saw the buffer maximized, the cursor was at the middle or bottom of the viewport.
This is really bugging me. I just today compiled Vim 7.4 and this is not how it used to be in Vim 7.2 (Redhat 6.4). I have verified that Vim 7.2 leaves the viewport how I last left it, but Vim 7.4 does not.
Is there a way to configure Vim 7.4 to act like Vim 7.2 in this regard?
-u NONE
and doing that stopped the annoying behavior. How do I find out what plugin is causing the problems? I'll have to do some searching...winminheight
setting, when set to 0, is the culprit. I turned off all plugins (except the ones that come bundled with vim 7.4) and it's still an issue. When set to 0, it always happens in vim 7.4, and it never happened in vim 7.2 :(