summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2009-06-16 13:35:20 +0000
committervimboss <devnull@localhost>2009-06-16 13:35:20 +0000
commit87e3fecb683cad592925a157a93c6dd05c3c4577 (patch)
tree20d7cea7e0dfe35f3d7358b98d1d827175d1a7a7
parent726e27be439788c7bf35dbe7f861b7e4262e68b6 (diff)
downloadvim-87e3fecb683cad592925a157a93c6dd05c3c4577.tar.gz
updated for version 7.2-202v7.2.202v7-2-202
-rw-r--r--src/fileio.c8
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c
index d1908631..ad7670d2 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4824,6 +4824,8 @@ set_rw_fname(fname, sfname)
char_u *sfname;
{
#ifdef FEAT_AUTOCMD
+ buf_T *buf = curbuf;
+
/* It's like the unnamed buffer is deleted.... */
if (curbuf->b_p_bl)
apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf);
@@ -4832,6 +4834,12 @@ set_rw_fname(fname, sfname)
if (aborting()) /* autocmds may abort script processing */
return FAIL;
# endif
+ if (curbuf != buf)
+ {
+ /* We are in another buffer now, don't do the renaming. */
+ EMSG(_(e_auchangedbuf));
+ return FAIL;
+ }
#endif
if (setfname(curbuf, fname, sfname, FALSE) == OK)
diff --git a/src/version.c b/src/version.c
index 72208d1b..496212eb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -677,6 +677,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 202,
+/**/
201,
/**/
200,