1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Filler lines above the first line may be hidden when opening Vim.
12 Solution: Change how topfill is computed. (Christian Brabandt)
13 Files: src/diff.c, src/testdir/test47.in, src/testdir/test47.ok
16 *** ../vim-7.3.707/src/diff.c 2012-05-18 18:47:11.000000000 +0200
17 --- src/diff.c 2012-10-21 22:08:44.000000000 +0200
21 /* A change may have made filler lines invalid, need to take care
22 * of that for other windows. */
23 ! if (wp != curwin && wp->w_topfill > 0)
25 - n = diff_check(wp, wp->w_topline);
26 if (wp->w_topfill > n)
27 wp->w_topfill = (n < 0 ? 0 : n);
33 /* A change may have made filler lines invalid, need to take care
34 * of that for other windows. */
35 ! n = diff_check(wp, wp->w_topline);
36 ! if ((wp != curwin && wp->w_topfill > 0) || n > 0)
38 if (wp->w_topfill > n)
39 wp->w_topfill = (n < 0 ? 0 : n);
40 + else if (n > 0 && n > wp->w_topfill)
45 *** ../vim-7.3.707/src/testdir/test47.in 2010-08-15 21:57:29.000000000 +0200
46 --- src/testdir/test47.in 2012-10-21 22:08:44.000000000 +0200
49 :call append("$", two)
50 :call append("$", three)
52 ! :unlet one two three
57 :call append("$", two)
58 :call append("$", three)
60 ! :" Test that diffing shows correct filler lines
75 ! :unlet! one two three w0
79 *** ../vim-7.3.707/src/testdir/test47.ok 2010-08-15 21:57:29.000000000 +0200
80 --- src/testdir/test47.ok 2012-10-21 22:08:44.000000000 +0200
88 *** ../vim-7.3.707/src/version.c 2012-10-21 21:38:42.000000000 +0200
89 --- src/version.c 2012-10-21 22:10:42.000000000 +0200
93 { /* Add new patch number below this line */
99 At some point in the project somebody will start whining about the need to
100 determine the project "requirements". This involves interviewing people who
101 don't know what they want but, curiously, know exactly when they need it.
102 (Scott Adams - The Dilbert principle)
104 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
105 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
106 \\\ an exciting new programming language -- http://www.Zimbu.org ///
107 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///