0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.2134: ml_get error when scrolling

Problem:  ml_get error when scrolling after delete
Solution: mark topline to be validated in main_loop
          if it is larger than current buffers line
          count

reset_lnums() is called after e.g. TextChanged autocommands and it may
accidentally cause curwin->w_topline to become invalid, e.g. if the
autocommand has deleted some lines.

So verify that curwin->w_topline points to a valid line and if not, mark
the window to have w_topline recalculated in main_loop() in
update_topline() after reset_lnums() returns.

fixes: #13568
fixes: #13578

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2023-11-27 23:25:03 +01:00
parent d1c3ef1f47
commit c4ffeddfe5
6 changed files with 875 additions and 1 deletions

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2134,
/**/
2133,
/**/