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)
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 329,
/**/
328,
/**/
/* 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);