This makes the popup menu preview window respect previewheight when
previewheight is less than the hard-coded default PUM preview size of 3.

There's already a check in prepare_tagpreview that prevents a newly-created
window from exceeding previewheight.

It might make more sense to just use p_pvh regardless of whether it's less than 
3.

My patch also assumes that p_pvh != 0 is the correct check for whether p_pvh is 
set.

Best,
Ben

---
 src/popupmnu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/popupmnu.c b/src/popupmnu.c
index 0afa0b7..b0e564f 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -558,8 +558,8 @@ pum_set_selected(n, repeat)
            win_T       *curwin_save = curwin;
            int         res = OK;
 
-           /* Open a preview window.  3 lines by default. */
-           g_do_tagpreview = 3;
+           /* Open a preview window.  min(p_pvh, 3) lines by default. */
+           g_do_tagpreview = (p_pvh && p_pvh < 3) ? p_pvh : 3;
            resized = prepare_tagpreview(FALSE);
            g_do_tagpreview = 0;
 
-- 
1.7.1

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui