# HG changeset patch # User Christian Brabandt # Date 1519495205 -3600 # Node ID 2c639a9a4def88447be17a041427be0eb4d6fc42 # Parent e32f79483a08a7cb750807d046d359db00f15f0f patch 8.0.1538: popupmenu is too far left when completion is long commit https://github.com/vim/vim/commit/bb008dd3239c5fe3ac04501e38e4c950fa9426c8 Author: Bram Moolenaar Date: Sat Feb 24 18:59:55 2018 +0100 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 https://github.com/vim/vim/issues/2661) diff --git a/src/popupmnu.c b/src/popupmnu.c --- 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 --- a/src/version.c +++ b/src/version.c @@ -779,6 +779,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1538, +/**/ 1537, /**/ 1536,