]> granicus.if.org Git - vim/commitdiff
patch 8.0.1538: popupmenu is too far left when completion is long v8.0.1538
authorBram Moolenaar <Bram@vim.org>
Sat, 24 Feb 2018 17:59:55 +0000 (18:59 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 24 Feb 2018 17:59:55 +0000 (18:59 +0100)
Problem:    Popupmenu is too far left when completion is long. (Linwei)
Solution:   Adjust column computations. (Hirohito Higashi, closes #2661)

src/popupmnu.c
src/version.c

index dfdcca072e5de801b84fb764ae5123a3b4f9062d..6ac121d91665b112d010869741adde8c46d48726 100644 (file)
@@ -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)
index ede62c9120c37677b045a941a27b42f8a588bd08..d434ea1ebcad79ab5c5edff09497fe07e4a19f37 100644 (file)
@@ -778,6 +778,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1538,
 /**/
     1537,
 /**/