diff --git a/src/terminal.c b/src/terminal.c index c681f3a432..1fc0ef9688 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -3451,6 +3451,10 @@ limit_scrollback(term_T *term, garray_T *gap, int update_buffer) sizeof(sb_line_T) * gap->ga_len); if (update_buffer) term->tl_scrollback_scrolled -= todo; + + // 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 153685953a..bfcb7bf8e3 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 */ +/**/ + 643, /**/ 642, /**/