patch 8.0.1289: mkview always includes the local directory

Problem:    Mkview always includes the local directory.
Solution:   Add the "curdir" value in 'viewoptions'. (Eric Roberts, closes
            #2316)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 547d1ac..84a72e1 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -11695,9 +11695,11 @@
     }
 
     /*
-     * 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
diff --git a/src/option.c b/src/option.c
index ceafea3..4f25c1f 100644
--- a/src/option.c
+++ b/src/option.c
@@ -2926,7 +2926,8 @@
     {"viewoptions", "vop",  P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
 #ifdef FEAT_SESSION
 			    (char_u *)&p_vop, PV_NONE,
-			    {(char_u *)"folds,options,cursor", (char_u *)0L}
+			    {(char_u *)"folds,options,cursor,curdir",
+								  (char_u *)0L}
 #else
 			    (char_u *)NULL, PV_NONE,
 			    {(char_u *)0L, (char_u *)0L}
diff --git a/src/version.c b/src/version.c
index ee19745..41bfa74 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1289,
+/**/
     1288,
 /**/
     1287,