To: vim_dev@googlegroups.com Subject: Patch 8.0.0099 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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) Files: src/popupmnu.c *** ../vim-8.0.0098/src/popupmnu.c 2016-11-04 22:08:26.014082864 +0100 --- src/popupmnu.c 2016-11-24 17:37:44.964839700 +0100 *************** *** 105,111 **** /* 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) { /* pum above "row" */ --- 105,112 ---- /* Put the pum below "row" if possible. If there are few lines decide on * where there is more room. */ ! if (row + 2 >= below_row - pum_height ! && row - above_row > (below_row - above_row) / 2) { /* pum above "row" */ *** ../vim-8.0.0098/src/version.c 2016-11-24 17:33:12.430669286 +0100 --- src/version.c 2016-11-24 17:38:35.820495843 +0100 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 99, /**/ -- Microsoft is to software what McDonalds is to gourmet cooking /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///