0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.0061: ml_get error with nested autocommand

Problem:    ml_get error with nested autocommand.
Solution:   Also check line numbers for a nested autocommand. (closes #10761)
This commit is contained in:
Bram Moolenaar
2022-07-23 09:06:48 +01:00
parent b9e717367c
commit 5fa9f23a63
5 changed files with 57 additions and 10 deletions

View File

@@ -2209,9 +2209,13 @@ apply_autocmds_group(
ap->last = FALSE;
ap->last = TRUE;
// Make sure cursor and topline are valid. The first time the current
// values are saved, restored by reset_lnums(). When nested only the
// values are corrected when needed.
if (nesting == 1)
// make sure cursor and topline are valid
check_lnums(TRUE);
else
check_lnums_nested(TRUE);
save_did_emsg = did_emsg;