> Do you have "scrolloff" set to anything? To make it work in general, > you'll need to clear this option at the beginning of your function and > (probably) restore it later.
No, scrolloff is 0. The strange thing is that it works when I enter the lines manually on the command line. When I call it as a function the other window is out of sync after pressing pagedown + pageup. I suspect that for whatever reason scrollbind doesn't properly set the other window's offset when running the code as a function. Maybe zt should be replaced with something else in the context of a script. BTW the function currently assumes 'splitright'. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---