summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-11-24 17:47:07 +0100
committerBram Moolenaar <Bram@vim.org>2016-11-24 17:47:07 +0100
commit73095288da839f7c738a49baa109773e76106806 (patch)
treef2b41b5f928bb4f3ed5c70aa591d1aa698eadf3d
parent58c358753ef47e217e18c0bf8a2fca9d1ea23a8e (diff)
patch 8.0.0099v8.0.0099
Problem: Popup menu always appears above the cursor when it is in the lower half of the screen. (Matt Gardner) Solution: Compute the available space better. (Hirohito Higashi, closes #1241)
-rw-r--r--src/popupmnu.c3
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/popupmnu.c b/src/popupmnu.c
index 19d215b9f5..307dbbedc6 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -105,7 +105,8 @@ redo:
/* Put the pum below "row" if possible. If there are few lines decide on
* where there is more room. */
- if (row - above_row >= below_row - row)
+ if (row + 2 >= below_row - pum_height
+ && row - above_row > (below_row - above_row) / 2)
{
/* pum above "row" */
diff --git a/src/version.c b/src/version.c
index 47f8135ca1..4064441c1b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 99,
+/**/
98,
/**/
97,