diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-06-17 13:52:40 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-06-17 13:52:40 +0200 |
commit | ec1561cac59006213dd5405d164a94dc7d002806 (patch) | |
tree | 4484b8f4ea4c5c3368fb98c77296b0b0d4c47407 | |
parent | 7a54a90744529ab4d3291fa5cdf7656184b8469c (diff) | |
download | vim-ec1561cac59006213dd5405d164a94dc7d002806.zip |
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)
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/window.c | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/version.c b/src/version.c index f25abaeee..b60a8213f 100644 --- 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, 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); |