Commit: patch 9.1.1348: still E315 with the terminal feature

1 view
Skip to first unread message

Christian Brabandt

unread,
Apr 27, 2025, 9:45:16 AM4/27/25
to vim...@googlegroups.com
patch 9.1.1348: still E315 with the terminal feature

Commit: https://github.com/vim/vim/commit/fa9753a721c6ea2d30f666aada0689d6ec2f2fd6
Author: Hirohito Higashi <h.eas...@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.eas...@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,
/**/
Reply all
Reply to author
Forward
0 new messages