diff --git a/src/mouse.c b/src/mouse.c index 3bdb1025e5..4e10e723ed 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -1902,16 +1902,6 @@ retnomove: // Drag the status line count = row - W_WINROW(dragwin) - dragwin->w_height + 1 - on_status_line; -#ifdef FEAT_TERMINAL - if (bt_terminal(dragwin->w_buffer)) - { - win_T *curwin_save = curwin; - curwin = dragwin; - update_topline(); - validate_cursor(); - curwin = curwin_save; - } -#endif win_drag_status_line(dragwin, count); did_drag |= count; } diff --git a/src/terminal.c b/src/terminal.c index eb27fa5c4c..88791b865b 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -3454,8 +3454,23 @@ limit_scrollback(term_T *term, garray_T *gap, int update_buffer) (sb_line_T *)gap->ga_data + todo, sizeof(sb_line_T) * gap->ga_len); if (update_buffer) + { + win_T *curwin_save = curwin; + win_T *wp = NULL; + term->tl_scrollback_scrolled -= todo; + FOR_ALL_WINDOWS(wp) + { + if (wp->w_buffer == term->tl_buffer) + { + curwin = wp; + check_cursor(); + } + } + curwin = curwin_save; + } + // make sure cursor is on a valid line if (curbuf == term->tl_buffer) check_cursor(); diff --git a/src/version.c b/src/version.c index 60c5243856..048788e60f 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1330, /**/ 1329, /**/ diff --git a/src/window.c b/src/window.c index 9ea68107c7..1eb32bc3ac 100644 --- a/src/window.c +++ b/src/window.c @@ -5643,10 +5643,6 @@ win_enter_ext(win_T *wp, int flags) did_decrement = TRUE; } #endif -#ifdef FEAT_TERMINAL - if (bt_terminal(curwin->w_buffer)) - update_topline(); -#endif win_fix_current_dir();