vim-patch:7.4.309 #843

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)

https://code.google.com/p/vim/source/detail?r=88a6e9f33822d33b6c32db578750c6c178c63f50
This commit is contained in:
Will Stamper 2014-06-13 18:09:25 -05:00 committed by Justin M. Keyes
parent 280d0ea5d3
commit dafd72f5b2
2 changed files with 5 additions and 4 deletions

View File

@ -248,7 +248,7 @@ static int included_patches[] = {
//312,
//311,
//310,
//309,
309,
308,
//307,
306,

View File

@ -4540,7 +4540,8 @@ void win_new_height(win_T *wp, int height)
--wp->w_wrow;
}
}
} else {
set_topline(wp, lnum);
} else if (sline > 0) {
while (sline > 0 && lnum > 1) {
hasFoldingWin(wp, lnum, &lnum, NULL, TRUE, NULL);
if (lnum == 1) {
@ -4566,13 +4567,13 @@ void win_new_height(win_T *wp, int height)
hasFoldingWin(wp, lnum, NULL, &lnum, TRUE, NULL);
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) {