if (call_do_modelines && did_aucmd)
do_modelines(0);
}
-
- check_cursor(); // just in case lines got deleted
}
/*
curbuf = buf;
aco->new_curwin_id = curwin->w_id;
set_bufref(&aco->new_curbuf, curbuf);
+
+ // disable the Visual area, the position may be invalid in another buffer
+ aco->save_VIsual_active = VIsual_active;
+ VIsual_active = FALSE;
}
/*
check_cursor();
}
}
+
+ check_cursor(); // just in case lines got deleted
+ VIsual_active = aco->save_VIsual_active;
+ if (VIsual_active)
+ check_pos(curbuf, &VIsual);
}
static int autocmd_nested = FALSE;
int save_prevwin_id; // ID of saved prevwin
bufref_T new_curbuf; // new curbuf
char_u *globaldir; // saved value of globaldir
+ int save_VIsual_active; // saved VIsual_active
} aco_save_T;
/*
%bwipe!
endfunc
+func Test_Visual_doautoall_redraw()
+ call setline(1, ['a', 'b'])
+ new
+ wincmd p
+ call feedkeys("G\<C-V>", 'txn')
+ autocmd User Explode ++once redraw
+ doautoall User Explode
+ %bwipe!
+endfunc
+
" This was using freed memory.
func Test_BufNew_arglocal()
arglocal