]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1348: still E315 with the terminal feature v9.1.1348
authorHirohito Higashi <h.east.727@gmail.com>
Sun, 27 Apr 2025 13:36:43 +0000 (15:36 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 27 Apr 2025 13:36:43 +0000 (15:36 +0200)
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.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/terminal.c
src/testdir/test_terminal2.vim
src/version.c

index 29926bf19ac728619dc099a4ff0cfee45727ce0c..471ab3af43ff857be30eee3464194d59e0c0f113 100644 (file)
@@ -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();
 }
 
 /*
index 542f2ec53e8b03799b2f74d46e612f1875ae0bce..e0f7bc56b55329b7ba016b04a1ee930a2abb3371 100644 (file)
@@ -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('$'))
index b805d70cfce4ca721c3df074dce8d58174c35f22..91f21643044f9fa0a99bc807bf56d5cdbf577bb0 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1348,
 /**/
     1347,
 /**/