]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1330: may receive E315 in terminal v9.1.1330
authorHirohito Higashi <h.east.727@gmail.com>
Mon, 21 Apr 2025 09:23:12 +0000 (11:23 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 21 Apr 2025 09:23:12 +0000 (11:23 +0200)
Problem:  may receive E315 in terminal
Solution: call check_cursor() (Hirohito Higashi)

fixes: #16024
fixes: #16211
fixes: #17099
closes: #17170

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/mouse.c
src/terminal.c
src/version.c
src/window.c

index 3bdb1025e5ef46ce58929c36c9e90f22f58f10db..4e10e723ed2a5784766a46e0075ffe40b2d52771 100644 (file)
@@ -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;
        }
index eb27fa5c4c5a2bb2d3faf50ae666ec3ec36b30f0..88791b865bfe41ab114ab65f317befa62b566b72 100644 (file)
@@ -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();
index 60c52438564d2d8a57231a9dd8169bf571afa59f..048788e60fc7c2f57c015c0b32a8b99e724cd1a4 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1330,
 /**/
     1329,
 /**/
index 9ea68107c74ac778031bd3378a86c7a6e50bfa2d..1eb32bc3acdc3540da610725eec0eb7a10ba3291 100644 (file)
@@ -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();