Skip to content

Commit 7309528

Browse files
committed
patch 8.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)
1 parent 58c3587 commit 7309528

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/popupmnu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ pum_display(
105105

106106
/* Put the pum below "row" if possible. If there are few lines decide on
107107
* where there is more room. */
108-
if (row - above_row >= below_row - row)
108+
if (row + 2 >= below_row - pum_height
109+
&& row - above_row > (below_row - above_row) / 2)
109110
{
110111
/* pum above "row" */
111112

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
99,
767769
/**/
768770
98,
769771
/**/

0 commit comments

Comments
 (0)