0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.2-202

This commit is contained in:
Bram Moolenaar 2009-06-16 13:35:20 +00:00
parent 3a6eaa58d5
commit 8b38e2416c
2 changed files with 10 additions and 0 deletions

View File

@ -4824,6 +4824,8 @@ set_rw_fname(fname, sfname)
char_u *sfname; char_u *sfname;
{ {
#ifdef FEAT_AUTOCMD #ifdef FEAT_AUTOCMD
buf_T *buf = curbuf;
/* It's like the unnamed buffer is deleted.... */ /* It's like the unnamed buffer is deleted.... */
if (curbuf->b_p_bl) if (curbuf->b_p_bl)
apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf); apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf);
@ -4832,6 +4834,12 @@ set_rw_fname(fname, sfname)
if (aborting()) /* autocmds may abort script processing */ if (aborting()) /* autocmds may abort script processing */
return FAIL; return FAIL;
# endif # endif
if (curbuf != buf)
{
/* We are in another buffer now, don't do the renaming. */
EMSG(_(e_auchangedbuf));
return FAIL;
}
#endif #endif
if (setfname(curbuf, fname, sfname, FALSE) == OK) if (setfname(curbuf, fname, sfname, FALSE) == OK)

View File

@ -676,6 +676,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
202,
/**/ /**/
201, 201,
/**/ /**/