summaryrefslogtreecommitdiff
path: root/src/popupmnu.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-01 11:59:00 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-01 11:59:00 +0100
commit614ab8aa00346724bfc27980d25985d482269b75 (patch)
treefe9a1080eaf1ba90dac24b15585e4ac14fab8aee /src/popupmnu.c
parent07dc18ffa4e7ed202f219fe2fd3d6f58246f71f9 (diff)
downloadvim-git-614ab8aa00346724bfc27980d25985d482269b75.tar.gz
patch 8.1.0554: popup menu overlaps with preview windowv8.1.0554
Problem: Popup menu overlaps with preview window. Solution: Adjust the height computation. (Hirohito Higashi, closes #3414)
Diffstat (limited to 'src/popupmnu.c')
-rw-r--r--src/popupmnu.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/popupmnu.c b/src/popupmnu.c
index c481d4be7..f3a9f3991 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -196,20 +196,11 @@ pum_display(
return;
#if defined(FEAT_QUICKFIX)
- // If there is a preview window at the above avoid drawing over it.
- // Do keep at least 10 entries.
- if (pvwin != NULL && pum_row < above_row && pum_height > 10)
+ // If there is a preview window above avoid drawing over it.
+ if (pvwin != NULL && pum_row < above_row && pum_height > above_row)
{
- if (pum_win_row - above_row < 10)
- {
- pum_row = pum_win_row - 10;
- pum_height = 10;
- }
- else
- {
- pum_row = above_row;
- pum_height = pum_win_row - above_row;
- }
+ pum_row = above_row;
+ pum_height = pum_win_row - above_row;
}
#endif