changeset 5977:018df65085f8 v7.4.329

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)
author Bram Moolenaar <bram@vim.org>
date Tue, 17 Jun 2014 13:52:40 +0200
parents d18c63fd0c48
children 4f8d7e5811e0
files src/version.c src/window.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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,
--- 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);