# HG changeset patch # User Bram Moolenaar # Date 1403005960 -7200 # Node ID 018df65085f8990c1407442f8c783d4cee72a479 # Parent d18c63fd0c484a9bfcfe8b04f4c3ff3bc20a1864 updated for version 7.4.329 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) diff --git a/src/version.c b/src/version.c --- 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 */ /**/ + 329, +/**/ 328, /**/ 327, diff --git a/src/window.c b/src/window.c --- a/src/window.c +++ b/src/window.c @@ -4250,6 +4250,11 @@ win_enter_ext(wp, undo_sync, curwin_inva /* sync undo before leaving the current buffer */ if (undo_sync && curbuf != wp->w_buffer) u_sync(FALSE); + + /* 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);