]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.329 v7.4.329
authorBram Moolenaar <Bram@vim.org>
Tue, 17 Jun 2014 11:52:40 +0000 (13:52 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 17 Jun 2014 11:52:40 +0000 (13:52 +0200)
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)

src/version.c
src/window.c

index f25abaeee785ad6b045295cf8a9612e1c2f462d2..b60a8213fe713a22934a0c2e8af9143008a92530 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    329,
 /**/
     328,
 /**/
index 4a0ed23c78e18bd55027f2c0f4681d2249eed18e..5215bb8e51d5f66a1e9c66a00bb1fcd75afac39d 100644 (file)
@@ -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);