revert: "vim-patch:9.0.0061: ml_get error with nested autocommand" (#19509)

This reverts commit 6cee15da72.

Port this again when https://github.com/vim/vim/issues/10780 is fixed.
This commit is contained in:
zeertzjq
2022-07-26 11:53:17 +08:00
committed by GitHub
parent 147cce29a6
commit 1a07044c1c
3 changed files with 10 additions and 47 deletions

View File

@@ -1837,13 +1837,9 @@ bool apply_autocmds_group(event_T event, char *fname, char *fname_io, bool force
}
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);
}
// Execute the autocmd. The `getnextac` callback handles iteration.