0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

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)
This commit is contained in:
Bram Moolenaar
2014-06-17 13:52:40 +02:00
parent 7a54a90744
commit ec1561cac5
2 changed files with 7 additions and 0 deletions

View File

@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
329,
/**/ /**/
328, 328,
/**/ /**/

View 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 */ /* sync undo before leaving the current buffer */
if (undo_sync && curbuf != wp->w_buffer) if (undo_sync && curbuf != wp->w_buffer)
u_sync(FALSE); 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' */ /* may have to copy the buffer options when 'cpo' contains 'S' */
if (wp->w_buffer != curbuf) if (wp->w_buffer != curbuf)
buf_copy_options(wp->w_buffer, BCO_ENTER | BCO_NOHELP); buf_copy_options(wp->w_buffer, BCO_ENTER | BCO_NOHELP);