diff options
author | Bram Moolenaar <bram@vim.org> | 2012-10-21 22:18:21 +0200 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2012-10-21 22:18:21 +0200 |
commit | 4276d6879ce70cdecebdaf9e01042cc33cfa582a (patch) | |
tree | 1777d0a35d3a2c7f743b179b8ea56cce821b0ad9 /src/diff.c | |
parent | ecd908948ea832e1a021628e577df5ed8a688499 (diff) | |
download | vim-7.3.708.tar.gz |
Problem: Filler lines above the first line may be hidden when opening Vim.
Solution: Change how topfill is computed. (Christian Brabandt)
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -615,11 +615,13 @@ diff_redraw(dofold) #endif /* A change may have made filler lines invalid, need to take care * of that for other windows. */ - if (wp != curwin && wp->w_topfill > 0) + n = diff_check(wp, wp->w_topline); + if ((wp != curwin && wp->w_topfill > 0) || n > 0) { - n = diff_check(wp, wp->w_topline); if (wp->w_topfill > n) wp->w_topfill = (n < 0 ? 0 : n); + else if (n > 0 && n > wp->w_topfill) + wp->w_topfill = n; } } } |