On 29-10-2009 Bram Moolenaar <[email protected]> wrote:
> 
> When I try this I get:
> 
>     window 1     window 2   
>    /dev/null     file.txt   
>  +------------+------------+
>  |filler      |last - 2    |
>  |filler      |last - 1    |
>  |_           |last line   |
>  |~           |~           |
>  |~           |~           |
>  |~           |~           |
>  +------------+------------+
> 
> Thus two filler lines are inserted, the file.txt window scrolls down.
> 
> If I remove "filler" from 'diffopt' then I don't get any scrolling.
> 
> Perhaps it depends on your option values, can you find out?

If I scroll file.txt then - yes - filler lines start to appear in the
window displaying /dev/null. Other than that I am unable to get the
correct scrolling behaviour you are describing.

The incorrect scrolling seems to be strictly related to line 187 in
move.c (function update_topline()):

186 #ifdef FEAT_DIFF
187     curwin->w_topfill = 0;
188 #endif

as commenting out the line or restoring curwin->w_topfill at the end of
update_topline() seems to alleviate the problem. However, I don't
suppose that the line is there without a reason (although I haven't
observed any undesired side effects after I removed it). Anyway, after
such a modification scrolling /dev/null yields a result as follows
(note: one more filler line than you are reporting; this seems
consistent with scrolling file.txt, though):

   window 1     window 2   
  /dev/null     file.txt   
+------------+------------+
|filler      |last line   |
|_           |~           |
|~           |~           |
|~           |~           |
|~           |~           |
|~           |~           |
+------------+------------+

and upon two more CTRL-Y presses:

   window 1     window 2   
  /dev/null     file.txt   
+------------+------------+
|filler      |last - 2    |
|filler      |last - 1    |
|filler      |last line   |
|_           |~           |
|~           |~           |
|~           |~           |
+------------+------------+

If I remove "filler" from 'diffopt', my problem disappears.

Everything I described happened on a freshly compiled normal version of
Vim 7.2.267 invoked as follows:
$ vim -u NONE -U NONE -d /dev/null runtime/doc/todo.txt

Maybe anyone else observes the correct behaviour and would be willing to
investigate which settings make the difference?

-- 
Cheers,
Lech

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui