patch 9.1.1348: still E315 with the terminal feature Commit: https://github.com/vim/vim/commit/fa9753a721c6ea2d30f666aada0689d6ec2f2fd6 Author: Hirohito Higashi <h.east....@gmail.com> Date: Sun Apr 27 15:36:43 2025 +0200
patch 9.1.1348: still E315 with the terminal feature Problem: still E315 with the terminal feature (user202729) Solution: call update_topline() in limit_scrollback() (Hirohito Higashi) fixes: #17195 closes: #17196 Signed-off-by: Hirohito Higashi <h.east....@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/src/terminal.c b/src/terminal.c index 29926bf19..471ab3af4 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -3455,8 +3455,8 @@ limit_scrollback(term_T *term, garray_T *gap, int update_buffer) sizeof(sb_line_T) * gap->ga_len); if (update_buffer) { - win_T *curwin_save = curwin; - win_T *wp = NULL; + win_T *curwin_save = curwin; + win_T *wp = NULL; term->tl_scrollback_scrolled -= todo; @@ -3466,14 +3466,11 @@ limit_scrollback(term_T *term, garray_T *gap, int update_buffer) { curwin = wp; check_cursor(); + update_topline(); } } curwin = curwin_save; } - - // make sure cursor is on a valid line - if (curbuf == term->tl_buffer) - check_cursor(); } /* diff --git a/src/testdir/test_terminal2.vim b/src/testdir/test_terminal2.vim index 542f2ec53..e0f7bc56b 100644 --- a/src/testdir/test_terminal2.vim +++ b/src/testdir/test_terminal2.vim @@ -245,6 +245,10 @@ func Test_termwinscroll() endfunc func Test_termwinscroll_topline() + if has('win32') + CheckGithubActions + endif + set termwinscroll=1000 mouse=a terminal call assert_equal(2, winnr('$')) diff --git a/src/version.c b/src/version.c index b805d70cf..91f216430 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 */ +/**/ + 1348, /**/ 1347, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1u92Je-00B7Lu-VT%40256bit.org.