diff options
author | Bram Moolenaar <bram@vim.org> | 2014-05-28 13:43:04 +0200 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2014-05-28 13:43:04 +0200 |
commit | 7f665a56fad6b6d21d616248e314990e2a426f59 (patch) | |
tree | 63017fe783326e0bdda68110acbdb4a7f119e962 | |
parent | 4188cdfee9b4a1db06e12c006e069251a2eefae5 (diff) | |
download | vim-7f665a56fad6b6d21d616248e314990e2a426f59.tar.gz |
Problem: When increasing the size of the lower window, the upper window
jumps back to the top. (Ron Aaron)
Solution: Change setting the topline. (Nobuhiro Takasaki)
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/window.c | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/version.c b/src/version.c index f72ae97f..403a6e47 100644 --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 309, +/**/ 308, /**/ 307, diff --git a/src/window.c b/src/window.c index cea7c402..856e7c45 100644 --- a/src/window.c +++ b/src/window.c @@ -5710,8 +5710,9 @@ win_new_height(wp, height) --wp->w_wrow; } } + set_topline(wp, lnum); } - else + else if (sline > 0) { while (sline > 0 && lnum > 1) { @@ -5748,14 +5749,15 @@ win_new_height(wp, height) lnum++; wp->w_wrow -= line_size + sline; } - else if (sline >= 0) + else if (sline > 0) { /* First line of file reached, use that as topline. */ lnum = 1; wp->w_wrow -= sline; } + + set_topline(wp, lnum); } - set_topline(wp, lnum); } if (wp == curwin) |