summaryrefslogtreecommitdiff
path: root/src/popupmnu.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-10-27 14:49:15 +0200
committerBram Moolenaar <Bram@vim.org>2016-10-27 14:49:15 +0200
commit50e5376926dc2ec4a26a7a16f8f0f3213c4afdf0 (patch)
treefe1420b53a534de8895d791e044ca9df8d5769b2 /src/popupmnu.c
parent46fceaaa8d1447a9588736d86eb4908214187b08 (diff)
downloadvim-git-50e5376926dc2ec4a26a7a16f8f0f3213c4afdf0.tar.gz
patch 8.0.0047v8.0.0047
Problem: Crash when using the preview window from an unnamed buffer. (lifepillar) Solution: Do not clear the wrong buffer. (closes #1200)
Diffstat (limited to 'src/popupmnu.c')
-rw-r--r--src/popupmnu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/popupmnu.c b/src/popupmnu.c
index d9d1feefa..b479b0045 100644
--- 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')
{