summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-05-03 21:26:49 +0000
committerBram Moolenaar <Bram@vim.org>2006-05-03 21:26:49 +0000
commit9c102387aff079b513533e93bb2a8109ccc1492c (patch)
tree5dc78df7736efe7105b9e939af9959d9f9f9fd7e /src/window.c
parentc05f93ffba24cd678b7f31b40e7b6f64ee12bf74 (diff)
downloadvim-9c102387aff079b513533e93bb2a8109ccc1492c.zip
updated for version 7.0g02
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c
index 09c638e0c..cbcdd4eb9 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5195,6 +5195,7 @@ win_new_height(wp, height)
int sline, line_size;
int space;
int did_below = FALSE;
+ int old_height = wp->w_height;
#define FRACTION_MULT 16384L
/* Don't want a negative height. Happens when splitting a tiny window.
@@ -5238,9 +5239,15 @@ win_new_height(wp, height)
}
else
{
- space = height;
+ space = height - 1;
+
while (lnum > 1)
{
+ /* When using "~" lines stop when at the old topline, don't
+ * scroll down. */
+ if (did_below && height < old_height && lnum <= wp->w_topline)
+ sline = 0;
+
space -= line_size;
if (space > 0 && sline <= 0 && !did_below)
{