There are some cases when winrestview() does not restore the way a
window looked when winsaveview() was called.
Namely: the top line is not correctly restored which results in the
contents of the window being scrolled.

The problem can be reproduced with by running the attached files:
- prepare.vim - execute "vim -S prepare.vim" to prepare files foo.txt
and bar.c for demonstration,
- reproduce.vim - execute "vim -S reproduce.vim" and press <F7> to see
how the window is split and the contents of the lower window are
scrolled so that the current line becomes the first one visible in the
window.

I attached a patch (ugly-scroll.patch) which takes care of the problem.

Cheers,
Lech

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Attachment: ugly-scroll.patch
Description: Binary data

Attachment: prepare.vim
Description: Binary data

Attachment: reproduce.vim
Description: Binary data

Raspunde prin e-mail lui