diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-11-24 17:47:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-11-24 17:47:07 +0100 |
commit | 73095288da839f7c738a49baa109773e76106806 (patch) | |
tree | f2b41b5f928bb4f3ed5c70aa591d1aa698eadf3d | |
parent | 58c358753ef47e217e18c0bf8a2fca9d1ea23a8e (diff) | |
download | vim-git-73095288da839f7c738a49baa109773e76106806.tar.gz |
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.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/popupmnu.c b/src/popupmnu.c index 19d215b9f..307dbbedc 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 47f8135ca..4064441c1 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, |