changeset 10302:210af8588e8a v8.0.0047

commit https://github.com/vim/vim/commit/50e5376926dc2ec4a26a7a16f8f0f3213c4afdf0 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 27 14:49:15 2016 +0200 patch 8.0.0047 Problem: Crash when using the preview window from an unnamed buffer. (lifepillar) Solution: Do not clear the wrong buffer. (closes https://github.com/vim/vim/issues/1200)
author Christian Brabandt <cb@256bit.org>
date Thu, 27 Oct 2016 15:00:04 +0200
parents 07d2b5a3b7cc
children 9b3b448e538e
files src/popupmnu.c src/version.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -582,7 +582,9 @@ pum_set_selected(int n, int repeat)
 
 	    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')
 		{
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    47,
+/**/
     46,
 /**/
     45,