patch 9.1.1330: may receive E315 in terminal Commit: https://github.com/vim/vim/commit/926e2af42e922a89731b99e7c8e2261d50edadb1 Author: Hirohito Higashi <h.east....@gmail.com> Date: Mon Apr 21 11:23:12 2025 +0200
patch 9.1.1330: may receive E315 in terminal 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....@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/src/mouse.c b/src/mouse.c index 3bdb1025e..4e10e723e 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -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; } diff --git a/src/terminal.c b/src/terminal.c index eb27fa5c4..88791b865 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -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(); diff --git a/src/version.c b/src/version.c index 60c524385..048788e60 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 */ +/**/ + 1330, /**/ 1329, /**/ diff --git a/src/window.c b/src/window.c index 9ea68107c..1eb32bc3a 100644 --- a/src/window.c +++ b/src/window.c @@ -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(); -- -- 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/E1u6nTc-00GGW1-B1%40256bit.org.