From: Bram Moolenaar Date: Tue, 17 Jun 2014 11:52:40 +0000 (+0200) Subject: updated for version 7.4.329 X-Git-Tag: v7.4.329 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec1561cac59006213dd5405d164a94dc7d002806;p=vim 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 index f25abaeee..b60a8213f 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 329, /**/ 328, /**/ diff --git a/src/window.c b/src/window.c index 4a0ed23c7..5215bb8e5 100644 --- a/src/window.c +++ b/src/window.c @@ -4250,6 +4250,11 @@ win_enter_ext(wp, undo_sync, curwin_invalid, trigger_enter_autocmds, trigger_lea /* 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);