> > The expected behaviour is that other window with 'scrollbind' set are > > synchronized automaticaly every time the number of lines between windows > > changes. > > 'scrollbind' was originally meant for parallel views of different but > related files (e.g. for use in vimdiff), not for different views of a > single file. When you delete a line in one file, it doesn't change the > number of lines' difference between that file and the other, since it is > assumed that you want to look at the _same_ point in _different_ files, > not the opposite.
Thank you for the reply, Tony. I understand that this was the original meaning of scrollbind and I rethought your argument once again but even after that my opinion still is that scrollbind is a quite general option. Why limit it to just one kind of usage? It sounds me like "the only one good purpose for 'while' command in C language" - imagine I tell you that you can use it for a loop over reading input lines but not for a loop over array items... There are more usage scenarios for scrollbind option than just one and I think it is not a good idea to force users to use it in just one way. All this is a question of amount of work - as I didn't find the way how scrollbind events work, I can't say how difficult the patch would be. But I still vote for this functionality if it was doable. > > The second problem are wrapped lines - they take space for several screen > > lines > > so the synchronization of windows is broken than (the offset is wrong, there > > are some lines between windows which you can't see). > > Easy to solve; set 'nowrap'. Or content yourself with an approximate > offset, not having one window start exactly where the other one left off > and not a single line higher or lower; Yes, you are right. It depends on the way how the patch will work (if even will exist :-) ) - I suggested to trace the last line of the window instead of the top one. This idea solves both problems, even the wrapped lines. But it may be too hard to implement and the next idea - just make hooks to commands adding or deleting lines - doesn't solve the problem of wrapped lines. Then the best option is to ignore the fact the second window is +-several lines not synced. > > -- > > The sig separator should be two dashes PLUS ONE SPACE. OK, sorry for that. Fixed. Milan -- Milan Vancura, Prague, Czech Republic, Europe --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---