mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.2.1939: invalid memory access in Ex mode with global command
Problem: Invalid memory access in Ex mode with global command. Solution: Make sure the cursor is on a valid line. (closes #7238)
This commit is contained in:
@@ -196,6 +196,7 @@ update_topline(void)
|
||||
// the cursor line.
|
||||
if (!screen_valid(TRUE) || curwin->w_height == 0)
|
||||
{
|
||||
check_cursor_lnum();
|
||||
curwin->w_topline = curwin->w_cursor.lnum;
|
||||
curwin->w_botline = curwin->w_topline;
|
||||
curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP;
|
||||
|
Reference in New Issue
Block a user