patch 8.1.2289: after :diffsplit closing the window does not disable diff

Problem:    After :diffsplit closing the window does not disable diff.
Solution:   Add "closeoff" to 'diffopt' and add it to the default.
diff --git a/src/diff.c b/src/diff.c
index 120a544..b16f7b6 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -35,8 +35,9 @@
 #define DIFF_VERTICAL	0x080	// vertical splits
 #define DIFF_HIDDEN_OFF	0x100	// diffoff when hidden
 #define DIFF_INTERNAL	0x200	// use internal xdiff algorithm
+#define DIFF_CLOSE_OFF	0x400	// diffoff when closing window
 #define ALL_WHITE_DIFF (DIFF_IWHITE | DIFF_IWHITEALL | DIFF_IWHITEEOL)
-static int	diff_flags = DIFF_INTERNAL | DIFF_FILLER;
+static int	diff_flags = DIFF_INTERNAL | DIFF_FILLER | DIFF_CLOSE_OFF;
 
 static long diff_algorithm = 0;
 
@@ -1545,6 +1546,14 @@
     if (eap->forceit)
 	diff_buf_clear();
 
+    if (!diffwin)
+    {
+	diff_need_update = FALSE;
+	curtab->tp_diff_invalid = FALSE;
+	curtab->tp_diff_update = FALSE;
+	diff_clear(curtab);
+    }
+
     /* Remove "hor" from from 'scrollopt' if there are no diff windows left. */
     if (!diffwin && vim_strchr(p_sbo, 'h') != NULL)
 	do_cmdline_cmd((char_u *)"set sbo-=hor");
@@ -2222,6 +2231,11 @@
 	    p += 9;
 	    diff_flags_new |= DIFF_HIDDEN_OFF;
 	}
+	else if (STRNCMP(p, "closeoff", 8) == 0)
+	{
+	    p += 8;
+	    diff_flags_new |= DIFF_CLOSE_OFF;
+	}
 	else if (STRNCMP(p, "indent-heuristic", 16) == 0)
 	{
 	    p += 16;
@@ -2310,6 +2324,15 @@
 }
 
 /*
+ * Return TRUE if 'diffopt' contains "closeoff".
+ */
+    int
+diffopt_closeoff(void)
+{
+    return (diff_flags & DIFF_CLOSE_OFF) != 0;
+}
+
+/*
  * Find the difference within a changed line.
  * Returns TRUE if the line was added, no other buffer has it.
  */