summaryrefslogtreecommitdiff
path: root/src/popupmnu.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-10-27 17:11:15 +0200
committerBram Moolenaar <Bram@vim.org>2010-10-27 17:11:15 +0200
commitee236d0d199d627193b0d61a2b3b8bbda323afd6 (patch)
tree326eb7ab0dfb2dbe61db07f7699d35a07284cc92 /src/popupmnu.c
parent3ca71f1f1f6b83e0ec078897959387fca58bdf55 (diff)
downloadvim-git-ee236d0d199d627193b0d61a2b3b8bbda323afd6.tar.gz
updated for version 7.3.044v7.3.044
Problem: The preview window opened by the popup menu is larger than specified with 'previewheight'. (Benjamin Haskell) Solution: Use 'previewheight' if it's set and smaller.
Diffstat (limited to 'src/popupmnu.c')
-rw-r--r--src/popupmnu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/popupmnu.c b/src/popupmnu.c
index 0afa0b7bc..44ed87804 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -558,8 +558,11 @@ pum_set_selected(n, repeat)
win_T *curwin_save = curwin;
int res = OK;
- /* Open a preview window. 3 lines by default. */
+ /* Open a preview window. 3 lines by default. Prefer
+ * 'previewheight' if set and smaller. */
g_do_tagpreview = 3;
+ if (p_pvh > 0 && p_pvh < g_do_tagpreview)
+ g_do_tagpreview = p_pvh;
resized = prepare_tagpreview(FALSE);
g_do_tagpreview = 0;