mirror of
https://github.com/neovim/neovim.git
synced 2025-09-25 12:38:33 +00:00
vim-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 vim/vim#10761)
5fa9f23a63
This commit is contained in:
@@ -1837,9 +1837,13 @@ 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.
|
||||
|
Reference in New Issue
Block a user