summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-11-11 18:16:48 +0100
committerBram Moolenaar <Bram@vim.org>2017-11-11 18:16:48 +0100
commit13e904199c2af6aac9b289a7f520d8e16f6e478a (patch)
tree0c1b860753be379999ff135050a4454e03c530e9 /src/ex_docmd.c
parentae147ab2d7649e7a0bcf11b9f3db1900c1a4d594 (diff)
patch 8.0.1289: mkview always includes the local directoryv8.0.1289
Problem: Mkview always includes the local directory. Solution: Add the "curdir" value in 'viewoptions'. (Eric Roberts, closes #2316)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 547d1acdbd..84a72e112b 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -11695,9 +11695,11 @@ put_view(
}
/*
- * Local directory.
+ * Local directory, if the current flag is not view options or the "curdir"
+ * option is included.
*/
- if (wp->w_localdir != NULL)
+ if (wp->w_localdir != NULL
+ && (flagp != &vop_flags || (*flagp & SSOP_CURDIR)))
{
if (fputs("lcd ", fd) < 0
|| ses_put_fname(fd, wp->w_localdir, flagp) == FAIL