mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-patch:8.2.2695: cursor position reset with nested autocommands
Problem: Cursor position reset with nested autocommands. Solution: Only check and reset line numbers for not nested autocommands. (closes vim/vim#5820)1e6bbfb560
N/A patches for version.c: vim-patch:8.2.2700: nested autocmd test fails sometimes Problem: Nested autocmd test fails sometimes. Solution: Wait for the job to finish.6437475ffb
vim-patch:8.2.2701: order of removing FORTIFY_SOURCE is wrong Problem: Order of removing FORTIFY_SOURCE is wrong. Solution: Use the more specific pattern first.26f201345d
This commit is contained in:
@@ -1621,13 +1621,21 @@ static bool apply_autocmds_group(event_T event,
|
||||
ap->last = false;
|
||||
}
|
||||
ap->last = true;
|
||||
check_lnums(true); // make sure cursor and topline are valid
|
||||
|
||||
if (nesting == 1) {
|
||||
// make sure cursor and topline are valid
|
||||
check_lnums(true);
|
||||
}
|
||||
|
||||
// Execute the autocmd. The `getnextac` callback handles iteration.
|
||||
do_cmdline(NULL, getnextac, (void *)&patcmd,
|
||||
DOCMD_NOWAIT | DOCMD_VERBOSE | DOCMD_REPEAT);
|
||||
|
||||
reset_lnums(); // restore cursor and topline, unless they were changed
|
||||
if (nesting == 1) {
|
||||
// restore cursor and topline, unless they were changed
|
||||
reset_lnums();
|
||||
}
|
||||
|
||||
|
||||
if (eap != NULL) {
|
||||
(void)set_cmdarg(NULL, save_cmdarg);
|
||||
|
Reference in New Issue
Block a user