mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
patch 9.1.0643: terminal: cursor may end up on invalid position
Problem: terminal: cursor may end up on invalid position after reducing the scrollback lines (user202729) Solution: After reducing the scrollback size, check the cursor position, making sure it does not end up on an invalid line fixes: #15351 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
9d997addc7
commit
1254e6db83
@ -3451,6 +3451,10 @@ limit_scrollback(term_T *term, garray_T *gap, int update_buffer)
|
|||||||
sizeof(sb_line_T) * gap->ga_len);
|
sizeof(sb_line_T) * gap->ga_len);
|
||||||
if (update_buffer)
|
if (update_buffer)
|
||||||
term->tl_scrollback_scrolled -= todo;
|
term->tl_scrollback_scrolled -= todo;
|
||||||
|
|
||||||
|
// make sure cursor is on a valid line
|
||||||
|
if (curbuf == term->tl_buffer)
|
||||||
|
check_cursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
643,
|
||||||
/**/
|
/**/
|
||||||
642,
|
642,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user