From: Bram Moolenaar Date: Sat, 24 Feb 2018 17:59:55 +0000 (+0100) Subject: patch 8.0.1538: popupmenu is too far left when completion is long X-Git-Tag: v8.0.1538 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb008dd3239c5fe3ac04501e38e4c950fa9426c8;p=vim 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) --- diff --git a/src/popupmnu.c b/src/popupmnu.c index dfdcca072..6ac121d91 100644 --- a/src/popupmnu.c +++ b/src/popupmnu.c @@ -253,7 +253,7 @@ pum_display( /* align right pum edge with "col" */ #ifdef FEAT_RIGHTLEFT 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; if (pum_col >= Columns) @@ -262,7 +262,7 @@ pum_display( else if (!curwin->w_p_rl) #endif { - if (col > Columns - max_width - pum_scrollbar) + if (curwin->w_wincol > Columns - max_width - pum_scrollbar) { pum_col = Columns - max_width - pum_scrollbar; if (pum_col < 0) diff --git a/src/version.c b/src/version.c index ede62c912..d434ea1eb 100644 --- a/src/version.c +++ b/src/version.c @@ -778,6 +778,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1538, /**/ 1537, /**/