mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
280d0ea5d3
commit
dafd72f5b2
@ -248,7 +248,7 @@ static int included_patches[] = {
|
|||||||
//312,
|
//312,
|
||||||
//311,
|
//311,
|
||||||
//310,
|
//310,
|
||||||
//309,
|
309,
|
||||||
308,
|
308,
|
||||||
//307,
|
//307,
|
||||||
306,
|
306,
|
||||||
|
@ -4540,7 +4540,8 @@ void win_new_height(win_T *wp, int height)
|
|||||||
--wp->w_wrow;
|
--wp->w_wrow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
set_topline(wp, lnum);
|
||||||
|
} else if (sline > 0) {
|
||||||
while (sline > 0 && lnum > 1) {
|
while (sline > 0 && lnum > 1) {
|
||||||
hasFoldingWin(wp, lnum, &lnum, NULL, TRUE, NULL);
|
hasFoldingWin(wp, lnum, &lnum, NULL, TRUE, NULL);
|
||||||
if (lnum == 1) {
|
if (lnum == 1) {
|
||||||
@ -4566,13 +4567,13 @@ void win_new_height(win_T *wp, int height)
|
|||||||
hasFoldingWin(wp, lnum, NULL, &lnum, TRUE, NULL);
|
hasFoldingWin(wp, lnum, NULL, &lnum, TRUE, NULL);
|
||||||
lnum++;
|
lnum++;
|
||||||
wp->w_wrow -= line_size + sline;
|
wp->w_wrow -= line_size + sline;
|
||||||
} else if (sline >= 0) {
|
} else if (sline > 0) {
|
||||||
/* First line of file reached, use that as topline. */
|
/* First line of file reached, use that as topline. */
|
||||||
lnum = 1;
|
lnum = 1;
|
||||||
wp->w_wrow -= sline;
|
wp->w_wrow -= sline;
|
||||||
}
|
}
|
||||||
|
set_topline(wp, lnum);
|
||||||
}
|
}
|
||||||
set_topline(wp, lnum);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wp == curwin) {
|
if (wp == curwin) {
|
||||||
|
Loading…
Reference in New Issue
Block a user