1
0
forked from aniani/vim

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.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Hirohito Higashi
2025-04-21 11:23:12 +02:00
committed by Christian Brabandt
parent 16341e7090
commit 926e2af42e
4 changed files with 17 additions and 14 deletions

View 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();