]> granicus.if.org Git - vim/commitdiff
patch 8.0.0099 v8.0.0099
authorBram Moolenaar <Bram@vim.org>
Thu, 24 Nov 2016 16:47:07 +0000 (17:47 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 24 Nov 2016 16:47:07 +0000 (17:47 +0100)
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)

src/popupmnu.c
src/version.c

index 19d215b9f5a9f009d23082a2bff7ba93cd48cf2b..307dbbedc66fd195a6b72d87e4a7ef00080ecb7b 100644 (file)
@@ -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" */
 
index 47f8135ca11188f09fd479ac6215a050d098e217..4064441c1b8d5fd604dff52f9c2d5166237302e9 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    99,
 /**/
     98,
 /**/