0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.0.1538: popupmenu is too far left when completion is long

Problem:    Popupmenu is too far left when completion is long. (Linwei)
Solution:   Adjust column computations. (Hirohito Higashi, closes #2661)
This commit is contained in:
Bram Moolenaar
2018-02-24 18:59:55 +01:00
parent 085346f5a1
commit bb008dd323
2 changed files with 4 additions and 2 deletions

View File

@@ -253,7 +253,7 @@ pum_display(
/* align right pum edge with "col" */ /* align right pum edge with "col" */
#ifdef FEAT_RIGHTLEFT #ifdef FEAT_RIGHTLEFT
if (curwin->w_p_rl if (curwin->w_p_rl
&& col < max_width + pum_scrollbar + 1) && W_ENDCOL(curwin) < max_width + pum_scrollbar + 1)
{ {
pum_col = col + max_width + pum_scrollbar + 1; pum_col = col + max_width + pum_scrollbar + 1;
if (pum_col >= Columns) if (pum_col >= Columns)
@@ -262,7 +262,7 @@ pum_display(
else if (!curwin->w_p_rl) else if (!curwin->w_p_rl)
#endif #endif
{ {
if (col > Columns - max_width - pum_scrollbar) if (curwin->w_wincol > Columns - max_width - pum_scrollbar)
{ {
pum_col = Columns - max_width - pum_scrollbar; pum_col = Columns - max_width - pum_scrollbar;
if (pum_col < 0) if (pum_col < 0)

View File

@@ -778,6 +778,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1538,
/**/ /**/
1537, 1537,
/**/ /**/