mirror of
https://github.com/neovim/neovim.git
synced 2024-12-27 14:21:31 -07:00
vim-patch:7.4.329 #1079
Problem: When moving the cursor and then switching to another window the previous window isn't scrolled. (Yukihiro Nakadaira) Solution: Call update_topline() before leaving the window. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=018df65085f8
This commit is contained in:
parent
8ae492bb5a
commit
a40a7cf24f
@ -266,7 +266,7 @@ static int included_patches[] = {
|
|||||||
//332 NA
|
//332 NA
|
||||||
331,
|
331,
|
||||||
//330,
|
//330,
|
||||||
//329,
|
329,
|
||||||
328,
|
328,
|
||||||
327,
|
327,
|
||||||
//326 NA
|
//326 NA
|
||||||
|
@ -3396,12 +3396,19 @@ static void win_enter_ext(win_T *wp, bool undo_sync, int curwin_invalid, int tri
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sync undo before leaving the current buffer */
|
// sync undo before leaving the current buffer
|
||||||
if (undo_sync && curbuf != wp->w_buffer)
|
if (undo_sync && curbuf != wp->w_buffer) {
|
||||||
u_sync(FALSE);
|
u_sync(FALSE);
|
||||||
/* may have to copy the buffer options when 'cpo' contains 'S' */
|
}
|
||||||
if (wp->w_buffer != curbuf)
|
|
||||||
|
// Might need to scroll the old window before switching, e.g., when the
|
||||||
|
// cursor was moved.
|
||||||
|
update_topline();
|
||||||
|
|
||||||
|
// may have to copy the buffer options when 'cpo' contains 'S'
|
||||||
|
if (wp->w_buffer != curbuf) {
|
||||||
buf_copy_options(wp->w_buffer, BCO_ENTER | BCO_NOHELP);
|
buf_copy_options(wp->w_buffer, BCO_ENTER | BCO_NOHELP);
|
||||||
|
}
|
||||||
if (!curwin_invalid) {
|
if (!curwin_invalid) {
|
||||||
prevwin = curwin; /* remember for CTRL-W p */
|
prevwin = curwin; /* remember for CTRL-W p */
|
||||||
curwin->w_redr_status = TRUE;
|
curwin->w_redr_status = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user