Mercurial > vim
diff src/window.c @ 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 | 1dbcb23ae7a8 |
children | f9fa2e506b9f |
line wrap: on
line diff
--- 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);