patch 8.0.0047
Problem:    Crash when using the preview window from an unnamed buffer.
            (lifepillar)
Solution:   Do not clear the wrong buffer. (closes #1200)
diff --git a/src/popupmnu.c b/src/popupmnu.c
index d9d1fee..b479b00 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -582,7 +582,9 @@
 
 	    if (curwin->w_p_pvw)
 	    {
-		if (curbuf->b_fname == NULL
+		if (!resized
+			&& curbuf->b_nwindows == 1
+			&& curbuf->b_fname == NULL
 			&& curbuf->b_p_bt[0] == 'n' && curbuf->b_p_bt[2] == 'f'
 			&& curbuf->b_p_bh[0] == 'w')
 		{
diff --git a/src/version.c b/src/version.c
index d25b91f..001c740 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    47,
+/**/
     46,
 /**/
     45,