To: vim_dev@googlegroups.com Subject: Patch 8.0.1522 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1522 (after 8.0.1491) Problem: Popup menu is positioned in the wrong place. (Davit Samvelyan, Boris Staletic) Solution: Correct computation of the column and the conditions for that. (Hirohito Higashi, closes #2640) Files: src/popupmnu.c *** ../vim-8.0.1521/src/popupmnu.c 2018-02-10 18:45:21.080822072 +0100 --- src/popupmnu.c 2018-02-17 20:30:41.336632701 +0100 *************** *** 252,277 **** { /* align right pum edge with "col" */ #ifdef FEAT_RIGHTLEFT ! if (curwin->w_p_rl) { pum_col = col + max_width + pum_scrollbar + 1; if (pum_col >= Columns) pum_col = Columns - 1; } ! else #endif { ! pum_col = col - max_width - pum_scrollbar; ! if (pum_col < 0) ! pum_col = 0; } #ifdef FEAT_RIGHTLEFT if (curwin->w_p_rl) ! pum_width = W_ENDCOL(curwin) - pum_col - pum_scrollbar + 1; else #endif ! pum_width = pum_col - pum_scrollbar; if (pum_width < p_pw) { --- 252,281 ---- { /* align right pum edge with "col" */ #ifdef FEAT_RIGHTLEFT ! if (curwin->w_p_rl ! && col < max_width + pum_scrollbar + 1) { pum_col = col + max_width + pum_scrollbar + 1; if (pum_col >= Columns) pum_col = Columns - 1; } ! else if (!curwin->w_p_rl) #endif { ! if (col > Columns - max_width - pum_scrollbar) ! { ! pum_col = Columns - max_width - pum_scrollbar; ! if (pum_col < 0) ! pum_col = 0; ! } } #ifdef FEAT_RIGHTLEFT if (curwin->w_p_rl) ! pum_width = pum_col - pum_scrollbar + 1; else #endif ! pum_width = Columns - pum_col - pum_scrollbar; if (pum_width < p_pw) { *** ../vim-8.0.1521/src/version.c 2018-02-16 20:01:00.234123812 +0100 --- src/version.c 2018-02-17 20:35:19.630729380 +0100 *************** *** 773,774 **** --- 773,776 ---- { /* Add new patch number below this line */ + /**/ + 1522, /**/ -- [Autumn changed into Winter ... Winter changed into Spring ... Spring changed back into Autumn and Autumn gave Winter and Spring a miss and went straight on into Summer ... Until one day ...] "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///