summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-05-01 21:21:21 +0000
committerBram Moolenaar <Bram@vim.org>2007-05-01 21:21:21 +0000
commiteeefcc7723e89ea4204598132ff4e995378fef5d (patch)
tree85c19316f49080648f25050ebe6af4a0b8486470 /src
parent0ddf0a7df0e3a9e966b25150df772b91f32182f8 (diff)
downloadvim-git-eeefcc7723e89ea4204598132ff4e995378fef5d.tar.gz
updated for version 7.0-239v7.0.239
Diffstat (limited to 'src')
-rw-r--r--src/ex_docmd.c13
-rw-r--r--src/fileio.c5
-rw-r--r--src/version.c2
3 files changed, 16 insertions, 4 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 3cb064e9c..d53c51eb8 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -375,6 +375,7 @@ static int makeopens __ARGS((FILE *fd, char_u *dirnow));
static int put_view __ARGS((FILE *fd, win_T *wp, int add_edit, unsigned *flagp));
static void ex_loadview __ARGS((exarg_T *eap));
static char_u *get_view_file __ARGS((int c));
+static int did_lcd; /* whether ":lcd" was produced for a session */
#else
# define ex_loadview ex_ni
#endif
@@ -8573,6 +8574,8 @@ ex_mkrc(eap)
}
#ifdef FEAT_SESSION
+ did_lcd = FALSE;
+
/* ":mkview" or ":mkview 9": generate file name with 'viewdir' */
if (eap->cmdidx == CMD_mkview
&& (*eap->arg == NUL
@@ -10327,6 +10330,7 @@ put_view(fd, wp, add_edit, flagp)
|| ses_put_fname(fd, wp->w_localdir, flagp) == FAIL
|| put_eol(fd) == FAIL)
return FAIL;
+ did_lcd = TRUE;
}
return OK;
@@ -10384,11 +10388,14 @@ ses_fname(fd, buf, flagp)
char_u *name;
/* Use the short file name if the current directory is known at the time
- * the session file will be sourced. Don't do this for ":mkview", we
- * don't know the current directory. */
+ * the session file will be sourced.
+ * Don't do this for ":mkview", we don't know the current directory.
+ * Don't do this after ":lcd", we don't keep track of what the current
+ * directory is. */
if (buf->b_sfname != NULL
&& flagp == &ssop_flags
- && (ssop_flags & (SSOP_CURDIR | SSOP_SESDIR)))
+ && (ssop_flags & (SSOP_CURDIR | SSOP_SESDIR))
+ && !did_lcd)
name = buf->b_sfname;
else
name = buf->b_ffname;
diff --git a/src/fileio.c b/src/fileio.c
index 20406bb49..a612c5961 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -8086,7 +8086,10 @@ ex_doautoall(eap)
/* execute the autocommands for this buffer */
retval = do_doautocmd(eap->arg, FALSE);
- do_modelines(0);
+
+ /* Execute the modeline settings, but don't set window-local
+ * options if we are using the current window for another buffer. */
+ do_modelines(aco.save_curwin == NULL ? OPT_NOWIN : 0);
/* restore the current window */
aucmd_restbuf(&aco);
diff --git a/src/version.c b/src/version.c
index d61acc7a9..358d4b5a5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 239,
+/**/
238,
/**/
237,