diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-03-16 21:41:35 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-03-16 21:41:35 +0000 |
commit | efd2bf158afeb2337dcb5a62c6198d6d2fb7cd5f (patch) | |
tree | b1eedda1b33b2b2d3901094c20f4b10362ec2b83 /src/popupmenu.c | |
parent | d3667a2e2971a879194084f4b61b8ff7ff9765a2 (diff) |
updated for version 7.0226
Diffstat (limited to 'src/popupmenu.c')
-rw-r--r-- | src/popupmenu.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/popupmenu.c b/src/popupmenu.c index ca3547cb58..e8ff417320 100644 --- a/src/popupmenu.c +++ b/src/popupmenu.c @@ -58,6 +58,7 @@ pum_display(array, size, selected) int row; int height; int col; + int above_row = cmdline_row; redo: def_width = PUM_DEF_WIDTH; @@ -80,6 +81,12 @@ redo: else top_clear = 0; + /* When the preview window is at the bottom stop just above it. Also + * avoid drawing over the status line so that it's clear there is a window + * boundary. */ + if (lastwin->w_p_pvw) + above_row -= lastwin->w_height + lastwin->w_status_height + 1; + /* * Figure out the size and position of the pum. */ @@ -92,8 +99,8 @@ redo: /* Put the pum below "row" if possible. If there are few lines decide on * where there is more room. */ - if (row >= cmdline_row - pum_height - && row > (cmdline_row - top_clear - height) / 2) + if (row >= above_row - pum_height + && row > (above_row - top_clear - height) / 2) { /* pum above "row" */ if (row >= size) @@ -116,8 +123,8 @@ redo: { /* pum below "row" */ pum_row = row + height; - if (size > cmdline_row - pum_row) - pum_height = cmdline_row - pum_row; + if (size > above_row - pum_row) + pum_height = above_row - pum_row; else pum_height = size; if (p_ph > 0 && pum_height > p_ph) |