|
Karsten Hopp |
bbd61e |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
bbd61e |
Subject: Patch 7.3.708
|
|
Karsten Hopp |
bbd61e |
Fcc: outbox
|
|
Karsten Hopp |
bbd61e |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
bbd61e |
Mime-Version: 1.0
|
|
Karsten Hopp |
bbd61e |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
bbd61e |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
bbd61e |
------------
|
|
Karsten Hopp |
bbd61e |
|
|
Karsten Hopp |
bbd61e |
Patch 7.3.708
|
|
Karsten Hopp |
bbd61e |
Problem: Filler lines above the first line may be hidden when opening Vim.
|
|
Karsten Hopp |
bbd61e |
Solution: Change how topfill is computed. (Christian Brabandt)
|
|
Karsten Hopp |
bbd61e |
Files: src/diff.c, src/testdir/test47.in, src/testdir/test47.ok
|
|
Karsten Hopp |
bbd61e |
|
|
Karsten Hopp |
bbd61e |
|
|
Karsten Hopp |
bbd61e |
*** ../vim-7.3.707/src/diff.c 2012-05-18 18:47:11.000000000 +0200
|
|
Karsten Hopp |
bbd61e |
--- src/diff.c 2012-10-21 22:08:44.000000000 +0200
|
|
Karsten Hopp |
bbd61e |
***************
|
|
Karsten Hopp |
bbd61e |
*** 615,625 ****
|
|
Karsten Hopp |
bbd61e |
#endif
|
|
Karsten Hopp |
bbd61e |
/* A change may have made filler lines invalid, need to take care
|
|
Karsten Hopp |
bbd61e |
* of that for other windows. */
|
|
Karsten Hopp |
bbd61e |
! if (wp != curwin && wp->w_topfill > 0)
|
|
Karsten Hopp |
bbd61e |
{
|
|
Karsten Hopp |
bbd61e |
- n = diff_check(wp, wp->w_topline);
|
|
Karsten Hopp |
bbd61e |
if (wp->w_topfill > n)
|
|
Karsten Hopp |
bbd61e |
wp->w_topfill = (n < 0 ? 0 : n);
|
|
Karsten Hopp |
bbd61e |
}
|
|
Karsten Hopp |
bbd61e |
}
|
|
Karsten Hopp |
bbd61e |
}
|
|
Karsten Hopp |
bbd61e |
--- 615,627 ----
|
|
Karsten Hopp |
bbd61e |
#endif
|
|
Karsten Hopp |
bbd61e |
/* A change may have made filler lines invalid, need to take care
|
|
Karsten Hopp |
bbd61e |
* of that for other windows. */
|
|
Karsten Hopp |
bbd61e |
! n = diff_check(wp, wp->w_topline);
|
|
Karsten Hopp |
bbd61e |
! if ((wp != curwin && wp->w_topfill > 0) || n > 0)
|
|
Karsten Hopp |
bbd61e |
{
|
|
Karsten Hopp |
bbd61e |
if (wp->w_topfill > n)
|
|
Karsten Hopp |
bbd61e |
wp->w_topfill = (n < 0 ? 0 : n);
|
|
Karsten Hopp |
bbd61e |
+ else if (n > 0 && n > wp->w_topfill)
|
|
Karsten Hopp |
bbd61e |
+ wp->w_topfill = n;
|
|
Karsten Hopp |
bbd61e |
}
|
|
Karsten Hopp |
bbd61e |
}
|
|
Karsten Hopp |
bbd61e |
}
|
|
Karsten Hopp |
bbd61e |
*** ../vim-7.3.707/src/testdir/test47.in 2010-08-15 21:57:29.000000000 +0200
|
|
Karsten Hopp |
bbd61e |
--- src/testdir/test47.in 2012-10-21 22:08:44.000000000 +0200
|
|
Karsten Hopp |
bbd61e |
***************
|
|
Karsten Hopp |
bbd61e |
*** 36,42 ****
|
|
Karsten Hopp |
bbd61e |
:call append("$", two)
|
|
Karsten Hopp |
bbd61e |
:call append("$", three)
|
|
Karsten Hopp |
bbd61e |
:$-2,$w! test.out
|
|
Karsten Hopp |
bbd61e |
! :unlet one two three
|
|
Karsten Hopp |
bbd61e |
:qa!
|
|
Karsten Hopp |
bbd61e |
ENDTEST
|
|
Karsten Hopp |
bbd61e |
|
|
Karsten Hopp |
bbd61e |
--- 36,57 ----
|
|
Karsten Hopp |
bbd61e |
:call append("$", two)
|
|
Karsten Hopp |
bbd61e |
:call append("$", three)
|
|
Karsten Hopp |
bbd61e |
:$-2,$w! test.out
|
|
Karsten Hopp |
bbd61e |
! :" Test that diffing shows correct filler lines
|
|
Karsten Hopp |
bbd61e |
! :diffoff!
|
|
Karsten Hopp |
bbd61e |
! :windo :bw!
|
|
Karsten Hopp |
bbd61e |
! :enew
|
|
Karsten Hopp |
bbd61e |
! :put =range(4,10)
|
|
Karsten Hopp |
bbd61e |
! :1d _
|
|
Karsten Hopp |
bbd61e |
! :vnew
|
|
Karsten Hopp |
bbd61e |
! :put =range(1,10)
|
|
Karsten Hopp |
bbd61e |
! :1d _
|
|
Karsten Hopp |
bbd61e |
! :windo :diffthis
|
|
Karsten Hopp |
bbd61e |
! :wincmd h
|
|
Karsten Hopp |
bbd61e |
! :let w0=line('w0')
|
|
Karsten Hopp |
bbd61e |
! :enew
|
|
Karsten Hopp |
bbd61e |
! :put =w0
|
|
Karsten Hopp |
bbd61e |
! :.w >> test.out
|
|
Karsten Hopp |
bbd61e |
! :unlet! one two three w0
|
|
Karsten Hopp |
bbd61e |
:qa!
|
|
Karsten Hopp |
bbd61e |
ENDTEST
|
|
Karsten Hopp |
bbd61e |
|
|
Karsten Hopp |
bbd61e |
*** ../vim-7.3.707/src/testdir/test47.ok 2010-08-15 21:57:29.000000000 +0200
|
|
Karsten Hopp |
bbd61e |
--- src/testdir/test47.ok 2012-10-21 22:08:44.000000000 +0200
|
|
Karsten Hopp |
bbd61e |
***************
|
|
Karsten Hopp |
bbd61e |
*** 1,3 ****
|
|
Karsten Hopp |
bbd61e |
--- 1,4 ----
|
|
Karsten Hopp |
bbd61e |
2-4-5-6-8-9
|
|
Karsten Hopp |
bbd61e |
1-2-4-5-8
|
|
Karsten Hopp |
bbd61e |
2-3-4-5-6-7-8
|
|
Karsten Hopp |
bbd61e |
+ 1
|
|
Karsten Hopp |
bbd61e |
*** ../vim-7.3.707/src/version.c 2012-10-21 21:38:42.000000000 +0200
|
|
Karsten Hopp |
bbd61e |
--- src/version.c 2012-10-21 22:10:42.000000000 +0200
|
|
Karsten Hopp |
bbd61e |
***************
|
|
Karsten Hopp |
bbd61e |
*** 727,728 ****
|
|
Karsten Hopp |
bbd61e |
--- 727,730 ----
|
|
Karsten Hopp |
bbd61e |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
bbd61e |
+ /**/
|
|
Karsten Hopp |
bbd61e |
+ 708,
|
|
Karsten Hopp |
bbd61e |
/**/
|
|
Karsten Hopp |
bbd61e |
|
|
Karsten Hopp |
bbd61e |
--
|
|
Karsten Hopp |
bbd61e |
At some point in the project somebody will start whining about the need to
|
|
Karsten Hopp |
bbd61e |
determine the project "requirements". This involves interviewing people who
|
|
Karsten Hopp |
bbd61e |
don't know what they want but, curiously, know exactly when they need it.
|
|
Karsten Hopp |
bbd61e |
(Scott Adams - The Dilbert principle)
|
|
Karsten Hopp |
bbd61e |
|
|
Karsten Hopp |
bbd61e |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
bbd61e |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
bbd61e |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
bbd61e |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|