patch 9.1.1817: popup: there are some position logic bugs

Commit: 
https://github.com/vim/vim/commit/e3ed5584ed7fad7070d49ddfba4f41bc2b22ca97
Author: Girish Palya <[email protected]>
Date:   Wed Oct 1 20:52:44 2025 +0000

    patch 9.1.1817: popup: there are some position logic bugs
    
    Problem:  popup: there are some position logic bugs
    Solution: Refactor position logic and fix a few bugs
              (Girish Palya).
    
    This change does the following:
    
    - Simplified and rewrote horizontal positioning logic (was overly
      complex).
    - Split horizontal and vertical positioning into separate functions.
    - Fixed missing truncation marker (e.g. `>`) when items were truncated
      and `pummaxwidth` was not set.
    - Fixed occasional extra space being added to menu items.
    - Update tests
    
    closes: #18441
    
    Signed-off-by: Girish Palya <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/popupmenu.c b/src/popupmenu.c
index 59966ea79..f13b332e4 100644
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -80,6 +80,165 @@ pum_compute_size(void)
     }
 }
 
+/*
+ * Calculate vertical placement for popup menu.
+ * Sets pum_row and pum_height based on available space.
+ */
+    static void
+pum_compute_vertical_placement(
+       int size,
+       int above_row,
+       int below_row)
+{
+    int context_lines;
+    int cline_visible_offset;
+
+    pum_height = MIN(size, PUM_DEF_HEIGHT);
+    if (p_ph > 0 && pum_height > p_ph)
+       pum_height = p_ph;
+
+    // Put the pum below "pum_win_row" if possible.  If there are few lines
+    // decide on where there is more room.
+    if (pum_win_row + 2 >= below_row - pum_height
+           && pum_win_row - above_row > (below_row - above_row) / 2)
+    {
+       // pum above "pum_win_row"
+       if (State & MODE_CMDLINE)
+           // for cmdline pum, no need for context lines
+           context_lines = 0;
+       else
+           // Leave two lines of context if possible
+           context_lines = MIN(2, curwin->w_wrow - curwin->w_cline_row);
+
+       if (pum_win_row >= size + context_lines)
+       {
+           pum_row = pum_win_row - size - context_lines;
+           pum_height = size;
+       }
+       else
+       {
+           pum_row = 0;
+           pum_height = pum_win_row - context_lines;
+       }
+       if (p_ph > 0 && pum_height > p_ph)
+       {
+           pum_row += pum_height - p_ph;
+           pum_height = p_ph;
+       }
+    }
+    else
+    {
+       // pum below "pum_win_row"
+       if (State & MODE_CMDLINE)
+           // for cmdline pum, no need for context lines
+           context_lines = 0;
+       else
+       {
+           // Leave three lines of context if possible
+           validate_cheight();
+           cline_visible_offset = curwin->w_cline_row +
+               curwin->w_cline_height - curwin->w_wrow;
+           context_lines = MIN(3, cline_visible_offset);
+       }
+
+       pum_row = pum_win_row + context_lines;
+       pum_height = MIN(below_row - pum_row, size);
+       if (p_ph > 0 && pum_height > p_ph)
+           pum_height = p_ph;
+    }
+
+#if defined(FEAT_QUICKFIX)
+    // If there is a preview window above avoid drawing over it.
+    if (above_row > 0 && pum_row < above_row && pum_height > above_row)
+    {
+       pum_row = above_row;
+       pum_height = pum_win_row - above_row;
+    }
+#endif
+}
+
+/*
+ * Try to set 'pum_width' so that it fits within available_width.
+ * Returns TRUE if pum_width was successfully set, FALSE otherwise.
+ */
+    static int
+set_pum_width_aligned_with_cursor(int width, int available_width)
+{
+    int end_padding = TRUE;
+
+    if (width < p_pw)
+    {
+       width = p_pw;
+       end_padding = FALSE;
+    }
+    if (p_pmw > 0 && width > p_pmw)
+    {
+       width = p_pmw;
+       end_padding = FALSE;
+    }
+
+    pum_width = width + (end_padding && width >= p_pw ? 1 : 0);
+    return available_width >= pum_width;
+}
+
+/*
+ * Calculate horizontal placement for popup menu. Sets pum_col and pum_width
+ * based on cursor position and available space.
+ */
+    static void
+pum_compute_horizontal_placement(int cursor_col)
+{
+    int desired_width = pum_base_width + pum_kind_width + pum_extra_width;
+    int available_width;
+
+#ifdef FEAT_RIGHTLEFT
+    if (pum_rl)
+       available_width = cursor_col - pum_scrollbar + 1;
+    else
+#endif
+       available_width = Columns - cursor_col - pum_scrollbar;
+
+    // Align pum with "cursor_col"
+    pum_col = cursor_col;
+    if (set_pum_width_aligned_with_cursor(desired_width, available_width))
+       return;
+    // Show the pum truncated, provided it is at least as wide as 'pum_width'
+    if (available_width > p_pw)
+    {
+       pum_width = available_width;
+       return;
+    }
+
+    // Truncated pum is no longer aligned with "cursor_col"
+#ifdef FEAT_RIGHTLEFT
+    if (pum_rl)
+       available_width = Columns - pum_scrollbar;
+    else
+#endif
+       available_width += cursor_col;
+
+    if (available_width > p_pw)
+    {
+       pum_width = p_pw + 1;  // Truncate beyond 'pum_width'
+#ifdef FEAT_RIGHTLEFT
+       if (pum_rl)
+           pum_col = pum_width + pum_scrollbar;
+       else
+#endif
+           pum_col = Columns - pum_width - pum_scrollbar;
+       return;
+    }
+
+    // Not enough room anywhere, use what we have
+#ifdef FEAT_RIGHTLEFT
+    if (pum_rl)
+       pum_col = Columns - 1;
+    else
+#endif
+       pum_col = 0;
+    pum_width = Columns - pum_scrollbar;
+}
+
 /*
  * Show the popup menu with items "array[size]".
  * "array" must remain valid until pum_undisplay() is called!
@@ -88,23 +247,17 @@ pum_compute_size(void)
  */
     void
 pum_display(
-    pumitem_T  *array,
-    int                size,
-    int                selected)       // index of initially selected item, 
none if
+       pumitem_T   *array,
+       int         size,
+       int         selected)   // index of initially selected item, -1 if
                                // out of range
 {
-    int                def_width;
-    int                max_width;
-    int                context_lines;
-    int                cursor_col;
-    int                above_row;
-    int                below_row;
-    int                cline_visible_offset;
-    int                content_width;
-    int                right_edge_col;
-    int                redo_count = 0;
+    int            cursor_col;
+    int            above_row;
+    int            below_row;
+    int            redo_count = 0;
 #if defined(FEAT_QUICKFIX)
-    win_T      *pvwin;
+    win_T   *pvwin;
 #endif
 
 #ifdef FEAT_RIGHTLEFT
@@ -113,9 +266,6 @@ pum_display(
 
     do
     {
-       def_width = p_pw;
-       if (p_pmw > 0 && def_width > p_pmw)
-           def_width = p_pmw;
        above_row = 0;
        below_row = cmdline_row;
 
@@ -151,84 +301,18 @@ pum_display(
        }
 #endif
 
-       /*
-        * Figure out the size and position of the pum.
-        */
-       pum_height = MIN(size, PUM_DEF_HEIGHT);
-       if (p_ph > 0 && pum_height > p_ph)
-           pum_height = p_ph;
-
-       // Put the pum below "pum_win_row" if possible.  If there are few lines
-       // decide on where there is more room.
-       if (pum_win_row + 2 >= below_row - pum_height
-                     && pum_win_row - above_row > (below_row - above_row) / 2)
-       {
-           // pum above "pum_win_row"
-           if (State & MODE_CMDLINE)
-               // for cmdline pum, no need for context lines
-               context_lines = 0;
-           else
-               // Leave two lines of context if possible
-               context_lines = MIN(2, curwin->w_wrow - curwin->w_cline_row);
-
-           if (pum_win_row >= size + context_lines)
-           {
-               pum_row = pum_win_row - size - context_lines;
-               pum_height = size;
-           }
-           else
-           {
-               pum_row = 0;
-               pum_height = pum_win_row - context_lines;
-           }
-           if (p_ph > 0 && pum_height > p_ph)
-           {
-               pum_row += pum_height - p_ph;
-               pum_height = p_ph;
-           }
-       }
-       else
-       {
-           // pum below "pum_win_row"
-           if (State & MODE_CMDLINE)
-               // for cmdline pum, no need for context lines
-               context_lines = 0;
-           else
-           {
-               // Leave three lines of context if possible
-               validate_cheight();
-               cline_visible_offset = curwin->w_cline_row +
-                                   curwin->w_cline_height - curwin->w_wrow;
-               context_lines = MIN(3, cline_visible_offset);
-           }
-
-           pum_row = pum_win_row + context_lines;
-           pum_height = MIN(below_row - pum_row, size);
-           if (p_ph > 0 && pum_height > p_ph)
-               pum_height = p_ph;
-       }
+       // Figure out the vertical size and position of the pum.
+       pum_compute_vertical_placement(size, above_row, below_row);
 
        // don't display when we only have room for one line
        if (pum_height < 1 || (pum_height == 1 && size > 1))
            return;
 
-#if defined(FEAT_QUICKFIX)
-       // If there is a preview window above avoid drawing over it.
-       if (pvwin != NULL && pum_row < above_row && pum_height > above_row)
-       {
-           pum_row = above_row;
-           pum_height = pum_win_row - above_row;
-       }
-#endif
-
        pum_array = array;
        pum_size = size;
        pum_compute_size();
-       max_width = pum_base_width;
-       if (p_pmw > 0 && max_width > p_pmw)
-           max_width = p_pmw;
 
-       // Calculate column
+       // Calculate cursor column
        if (State & MODE_CMDLINE)
            // cmdline completion popup menu
            cursor_col = cmdline_compl_startcol();
@@ -245,134 +329,10 @@ pum_display(
        }
 
        // if there are more items than room we need a scrollbar
-       if (pum_height < size)
-       {
-           pum_scrollbar = 1;
-           ++max_width;
-       }
-       else
-           pum_scrollbar = 0;
-
-       if (def_width < max_width)
-           def_width = max_width;
-
-       if (((cursor_col < Columns - p_pw || cursor_col < Columns - max_width)
-#ifdef FEAT_RIGHTLEFT
-                   && !pum_rl)
-              || (pum_rl && (cursor_col > p_pw || cursor_col > max_width)
-#endif
-          ))
-       {
-           // align pum with "cursor_col"
-           pum_col = cursor_col;
-
-           // start with the maximum space available
-#ifdef FEAT_RIGHTLEFT
-           if (pum_rl)
-               pum_width = pum_col - pum_scrollbar + 1;
-           else
-#endif
-               pum_width = Columns - pum_col - pum_scrollbar;
-
-           content_width = max_width + pum_kind_width + pum_extra_width + 1;
-           if (pum_width > content_width && pum_width > p_pw)
-           {
-               // Reduce width to fit item
-               pum_width = MAX(content_width, p_pw);
-               if (p_pmw > 0 && pum_width > p_pmw)
-                   pum_width = p_pmw;
-           }
-           else if (((cursor_col > p_pw || cursor_col > max_width)
-#ifdef FEAT_RIGHTLEFT
-                       && !pum_rl)
-               || (pum_rl && (cursor_col < Columns - p_pw
-                       || cursor_col < Columns - max_width)
-#endif
-                   ))
-           {
-               // align pum edge with "cursor_col"
-#ifdef FEAT_RIGHTLEFT
-               if (pum_rl
-                       && W_ENDCOL(curwin) < max_width + pum_scrollbar + 1)
-               {
-                   pum_col = cursor_col + max_width + pum_scrollbar + 1;
-                   if (pum_col >= Columns)
-                       pum_col = Columns - 1;
-               }
-               else if (!pum_rl)
-#endif
-               {
-                   right_edge_col = Columns - max_width - pum_scrollbar;
-                   if (curwin->w_wincol > right_edge_col && max_width <= p_pw)
-                       // use full width to end of the screen
-                       pum_col = MAX(0, right_edge_col);
-               }
-
-#ifdef FEAT_RIGHTLEFT
-               if (pum_rl)
-                   pum_width = pum_col - pum_scrollbar + 1;
-               else
-#endif
-                   pum_width = Columns - pum_col - pum_scrollbar;
-
-               if (pum_width < p_pw)
-               {
-                   pum_width = p_pw;
-                   if (p_pmw > 0 && pum_width > p_pmw)
-                       pum_width = p_pmw;
-#ifdef FEAT_RIGHTLEFT
-                   if (pum_rl)
-                   {
-                       if (pum_width > pum_col)
-                           pum_width = pum_col;
-                   }
-                   else
-#endif
-                   {
-                       if (pum_width >= Columns - pum_col)
-                           pum_width = Columns - pum_col - 1;
-                   }
-               }
-               else if (pum_width > content_width && pum_width > p_pw)
-               {
-                   pum_width = MAX(content_width, p_pw);
-                   if (p_pmw > 0 && pum_width > p_pmw)
-                       pum_width = p_pmw;
-               }
-               else if (p_pmw > 0 && pum_width > p_pmw)
-               {
-                   pum_width = p_pmw;
-               }
-           }
+       pum_scrollbar = (pum_height < size) ? 1 : 0;
 
-       }
-       else if (Columns < def_width)
-       {
-           // not enough room, will use what we have
-#ifdef FEAT_RIGHTLEFT
-           if (pum_rl)
-               pum_col = Columns - 1;
-           else
-#endif
-               pum_col = 0;
-           pum_width = Columns - 1;
-           if (p_pmw > 0 && pum_width > p_pmw)
-               pum_width = p_pmw;
-       }
-       else
-       {
-           if (max_width > p_pw)
-               max_width = p_pw;       // truncate
-           if (p_pmw > 0 && max_width > p_pmw)
-               max_width = p_pmw;
-#ifdef FEAT_RIGHTLEFT
-           if (pum_rl)
-               pum_col = max_width - 1;
-           else
-#endif
-               pum_col = Columns - max_width;
-           pum_width = max_width - pum_scrollbar;
-       }
+       // Figure out the horizontal size and position of the pum.
+       pum_compute_horizontal_placement(cursor_col);
 
        // Set selected item and redraw.  If the window size changed need to
        // redo the positioning.  Limit this to two times, when there is not
@@ -545,16 +505,6 @@ pum_screen_puts_with_attrs(
     }
 }
 
-
-    static inline void
-pum_align_order(int *order)
-{
-    int is_default = cia_flags == 0;
-    order[0] = is_default ? CPT_ABBR : cia_flags / 100;
-    order[1] = is_default ? CPT_KIND : (cia_flags / 10) % 10;
-    order[2] = is_default ? CPT_MENU : cia_flags % 10;
-}
-
     static inline char_u *
 pum_get_item(int index, int type)
 {
@@ -618,7 +568,7 @@ pum_display_rtl_text(
 
     char_u *rt_start = rt;
     cells = mb_string2cells(rt, -1);
-    truncated = width_limit == p_pmw && width_limit - totwidth < cells + pad;
+    truncated = width_limit - totwidth - 1 < cells + pad;
 
     // only draw the text that fits
     if (cells > width_limit)
@@ -714,7 +664,7 @@ pum_display_ltr_text(
 
     size = (int)STRLEN(st);
     cells = (*mb_string2cells)(st, size);
-    truncated = width_limit == p_pmw && width_limit - totwidth < cells + pad;
+    truncated = width_limit - totwidth - 1 < cells + pad;
 
     // only draw the text that fits
     while (size > 0 && col + cells > width_limit + pum_col)
@@ -878,6 +828,15 @@ pum_draw_scrollbar(
        screen_putchar(' ', row, pum_col + pum_width, attr);
 }
 
+    static inline void
+pum_align_order(int *order)
+{
+    int is_default = cia_flags == 0;
+    order[0] = is_default ? CPT_ABBR : cia_flags / 100;
+    order[1] = is_default ? CPT_KIND : (cia_flags / 10) % 10;
+    order[2] = is_default ? CPT_MENU : cia_flags % 10;
+}
+
 /*
  * Redraw the popup menu, using "pum_first" and "pum_selected".
  */
@@ -984,6 +943,8 @@ pum_redraw(void)
 
            if (j + 1 < 3)
                next_isempty = pum_get_item(idx, order[j + 1]) == NULL;
+           else
+               next_isempty = TRUE;
 
            if (p != NULL)
                // Process and display the item
diff --git a/src/testdir/dumps/Test_long_line_noselect_1.dump 
b/src/testdir/dumps/Test_long_line_noselect_1.dump
index a63ef65a5..bb30afe90 100644
--- a/src/testdir/dumps/Test_long_line_noselect_1.dump
+++ b/src/testdir/dumps/Test_long_line_noselect_1.dump
@@ -4,5 +4,5 @@
 |~| @58
 |~| @58
 |~| @58
-|~| @10| +0#0000001#ffd7ff255|l|o@15|n|g| |q|u|i|t|e| |l|o@11|n|g|,| |r|e|a|l
+|~| @10| +0#0000001#ffd7ff255|l|o@15|n|g| |q|u|i|t|e| |l|o@11|n|g|,| |r|e|a|>
 |:+0#0000000#ffffff0|D|o|u|b|l|e|E|n|t|r|y| > @46
diff --git a/src/testdir/dumps/Test_long_line_noselect_2.dump 
b/src/testdir/dumps/Test_long_line_noselect_2.dump
index 5bd4ea179..8ef6842d2 100644
--- a/src/testdir/dumps/Test_long_line_noselect_2.dump
+++ b/src/testdir/dumps/Test_long_line_noselect_2.dump
@@ -2,7 +2,7 @@
 |~| @58
 |~| @58
 |~| @58
-|~| @10| +0#0000001#e0e0e08|l|o@15|n|g| |q|u|i|t|e| |l|o@11|n|g|,| |r|e|a|l
+|~| @10| +0#0000001#e0e0e08|l|o@15|n|g| |q|u|i|t|e| |l|o@11|n|g|,| |r|e|a|>
 |:+0#0000000#ffffff0|D|o|u|b|l|e|E|n|t|r|y| |l|o@15|n|g| |q|u|i|t|e| 
|l|o@11|n|g|,| |r|e|a|l
 @1|y| |l|o@11|n|g|,| |p|r|o|b|a|b|l|y| |t|o@1| |l|o@25
 @1|n|g| |e|n|t|r|y> @50
diff --git a/src/testdir/dumps/Test_long_line_noselect_3.dump 
b/src/testdir/dumps/Test_long_line_noselect_3.dump
index d79a28453..e90b564eb 100644
--- a/src/testdir/dumps/Test_long_line_noselect_3.dump
+++ b/src/testdir/dumps/Test_long_line_noselect_3.dump
@@ -2,7 +2,7 @@
 |~| @58
 |~| @58
 |~| @58
-|~| @10| +0#0000001#ffd7ff255|l|o@15|n|g| |q|u|i|t|e| |l|o@11|n|g|,| |r|e|a|l
+|~| @10| +0#0000001#ffd7ff255|l|o@15|n|g| |q|u|i|t|e| |l|o@11|n|g|,| |r|e|a|>
 |:+0#0000000#ffffff0|D|o|u|b|l|e|E|n|t|r|y| > @46
 @60
 @60
diff --git a/src/testdir/dumps/Test_mouse_popup_position_01.dump 
b/src/testdir/dumps/Test_mouse_popup_position_01.dump
index 54ba886c9..8e936045f 100644
--- a/src/testdir/dumps/Test_mouse_popup_position_01.dump
+++ b/src/testdir/dumps/Test_mouse_popup_position_01.dump
@@ -5,7 +5,7 @@
 |~+0#4040ff13#ffffff0| @31| +0#0000001#ffd7ff255@16
 |~+0#4040ff13#ffffff0| @31| +0#0000001#ffd7ff255|S|e|l|e|c|t| |W|o|r|d| @4
 |~+0#4040ff13#ffffff0| @31| +0#0000001#ffd7ff255|S|e|l|e|c|t| 
|S|e|n|t|e|n|c|e| 
-|~+0#4040ff13#ffffff0| @31| +0#0000001#ffd7ff255|S|e|l|e|c|t| 
|P|a|r|a|g|r|a|p|h
+|~+0#4040ff13#ffffff0| @31| +0#0000001#ffd7ff255|S|e|l|e|c|t| 
|P|a|r|a|g|r|a|p|>
 |~+0#4040ff13#ffffff0| @31| +0#0000001#ffd7ff255|S|e|l|e|c|t| |L|i|n|e| @4
 |~+0#4040ff13#ffffff0| @31| +0#0000001#ffd7ff255|S|e|l|e|c|t| |B|l|o|c|k| @3
 |~+0#4040ff13#ffffff0| @31| +0#0000001#ffd7ff255|S|e|l|e|c|t| |A|l@1| @5
diff --git a/src/testdir/dumps/Test_mouse_popup_position_02.dump 
b/src/testdir/dumps/Test_mouse_popup_position_02.dump
index 7dfab529e..babd58702 100644
--- a/src/testdir/dumps/Test_mouse_popup_position_02.dump
+++ b/src/testdir/dumps/Test_mouse_popup_position_02.dump
@@ -5,7 +5,7 @@
 | +0#0000001#ffd7ff255@16| +0#4040ff13#ffffff0@31|~
 | +0#0000001#ffd7ff255@4|d|r|o|W| |t|c|e|l|e|S| | +0#4040ff13#ffffff0@31|~
 | +0#0000001#ffd7ff255|e|c|n|e|t|n|e|S| |t|c|e|l|e|S| | 
+0#4040ff13#ffffff0@31|~
-|h+0#0000001#ffd7ff255|p|a|r|g|a|r|a|P| |t|c|e|l|e|S| | 
+0#4040ff13#ffffff0@31|~
+|<+0#0000001#ffd7ff255|p|a|r|g|a|r|a|P| |t|c|e|l|e|S| | 
+0#4040ff13#ffffff0@31|~
 | +0#0000001#ffd7ff255@4|e|n|i|L| |t|c|e|l|e|S| | +0#4040ff13#ffffff0@31|~
 | +0#0000001#ffd7ff255@3|k|c|o|l|B| |t|c|e|l|e|S| | +0#4040ff13#ffffff0@31|~
 | +0#0000001#ffd7ff255@5|l@1|A| |t|c|e|l|e|S| | +0#4040ff13#ffffff0@31|~
diff --git a/src/testdir/dumps/Test_popup_position_02.dump 
b/src/testdir/dumps/Test_popup_position_02.dump
index c3613c351..8f7c6566d 100644
--- a/src/testdir/dumps/Test_popup_position_02.dump
+++ b/src/testdir/dumps/Test_popup_position_02.dump
@@ -2,7 +2,7 @@
 |1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|b| 
@5||+1&&|1+0&&|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|b| @5
 @12|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5||+1&&| 
+0&&@11|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5
 |6|7|8|9|_|a| @30||+1&&|6+0&&|7|8|9|_|a> @30
-|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @9| 
+0#0000001#e0e0e08|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5
-|~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @9| 
+0#0000001#ffd7ff255|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5
+|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @9| 
+0#0000001#e0e0e08|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|>
+|~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @9| 
+0#0000001#ffd7ff255|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|>
 |~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
 |~| @35||+1#0000000&|~+0#4040ff13&| @35
diff --git a/src/testdir/dumps/Test_popup_position_03.dump 
b/src/testdir/dumps/Test_popup_position_03.dump
index 650cb7f21..9b86f34e5 100644
--- a/src/testdir/dumps/Test_popup_position_03.dump
+++ b/src/testdir/dumps/Test_popup_position_03.dump
@@ -2,7 +2,7 @@
 |1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|b| 
@5||+1&&|1+0&&|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|b| @5
 @12|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5||+1&&| 
+0&&@11|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5
 |6|7|8|9|_|a| @30||+1&&|6+0&&|7|8|9|_|a> @30
-|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @4| 
+0#0000001#e0e0e08|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_
-|~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @4| 
+0#0000001#ffd7ff255|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_
+|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @3| 
+0#0000001#e0e0e08|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|>
+|~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @3| 
+0#0000001#ffd7ff255|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|>
 |~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
 |~| @35||+1#0000000&|~+0#4040ff13&| @35
diff --git a/src/testdir/dumps/Test_popup_position_04.dump 
b/src/testdir/dumps/Test_popup_position_04.dump
index 1793b232c..59cb10b17 100644
--- a/src/testdir/dumps/Test_popup_position_04.dump
+++ b/src/testdir/dumps/Test_popup_position_04.dump
@@ -4,7 +4,7 @@
 |8|9|_|b| @32||+1&&|8+0&&|9|_|b| @32
 @12|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5||+1&&| 
+0&&@11|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5
 |6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|a| 
@20||+1&&|6+0&&|7|8|9|_|1|2|3|4|5|6|7|8|9|_|a> @20
-|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @9| 
+0#0000001#e0e0e08|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5
-|~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @9| 
+0#0000001#ffd7ff255|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5
+|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @9| 
+0#0000001#e0e0e08|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|>
+|~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @9| 
+0#0000001#ffd7ff255|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|>
 |~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
 |~| @35||+1#0000000&|~+0#4040ff13&| @35
diff --git a/src/testdir/dumps/Test_popupwin_infopopup_6.dump 
b/src/testdir/dumps/Test_popupwin_infopopup_6.dump
index 18ed96bcb..d6be202d1 100644
--- a/src/testdir/dumps/Test_popupwin_infopopup_6.dump
+++ b/src/testdir/dumps/Test_popupwin_infopopup_6.dump
@@ -1,7 +1,7 @@
-|a+0&#ffffff0|w|o|r|d> @17|╔+0&#ffff4012|═@15|X| +0&#ffffff0@33
-|w+0#0000001#e0e0e08|r|d| @4|W| |e|x|t|r|a| |t|e|x|t| @1| 
+0#0000000#0000001|║+0&#ffff4012| |w|o|r|d|s| |a|r|e| |c|o@1|l| |║| 
+0#4040ff13#ffffff0@33
-|a+0#0000001#ffd7ff255|n|o|t|w|r|d| |W| |e|x|t|r|a| |t|e|x|t| @1| 
+0#0000000#0000001|╚+0&#ffff4012|═@15|⇲| +0#4040ff13#ffffff0@33
-|n+0#0000001#ffd7ff255|o|a|w|r|d| @1|W| |e|x|t|r|a| |t|e|x|t| @1| 
+0#0000000#a8a8a8255| +0#4040ff13#ffffff0@51
+|a+0&#ffffff0|w|o|r|d> @69
+|w+0#0000001#e0e0e08|r|d| @4|W| |e|x|t|r|a| |t|e|x|t| | +0#0000000#0000001| 
+0#0000001#e0e0e08|w|o|r|d|s| |a|r|e| |c|o@1|l| | +0#4040ff13#ffffff0@36
+|a+0#0000001#ffd7ff255|n|o|t|w|r|d| |W| |e|x|t|r|a| |t|e|x|t| | 
+0#0000000#0000001| +0#4040ff13#ffffff0@52
+|n+0#0000001#ffd7ff255|o|a|w|r|d| @1|W| |e|x|t|r|a| |t|e|x|t| | 
+0#0000000#a8a8a8255| +0#4040ff13#ffffff0@52
 |~| @73
 |~| @73
 |~| @73
diff --git a/src/testdir/dumps/Test_popupwin_infopopup_7.dump 
b/src/testdir/dumps/Test_popupwin_infopopup_7.dump
index 3890d1235..f558f4cf9 100644
--- a/src/testdir/dumps/Test_popupwin_infopopup_7.dump
+++ b/src/testdir/dumps/Test_popupwin_infopopup_7.dump
@@ -1,8 +1,8 @@
 |a+0&#ffffff0|w|o|r|d| @69
-|t|e|s|t| |t|e|x|t| |a|w|o|r|d> @17|╔+0&#ffff4012|═@15|X| +0&#ffffff0@23
-|~+0#4040ff13&| @7| +0#0000001#e0e0e08|w|r|d| @4|W| |e|x|t|r|a| |t|e|x|t| @1| 
+0#0000000#0000001|║+0&#ffff4012| |w|o|r|d|s| |a|r|e| |c|o@1|l| |║| 
+0#4040ff13#ffffff0@23
-|~| @7| +0#0000001#ffd7ff255|a|n|o|t|w|r|d| |W| |e|x|t|r|a| |t|e|x|t| @1| 
+0#0000000#0000001|╚+0&#ffff4012|═@15|⇲| +0#4040ff13#ffffff0@23
-|~| @7| +0#0000001#ffd7ff255|n|o|a|w|r|d| @1|W| |e|x|t|r|a| |t|e|x|t| @1| 
+0#0000000#a8a8a8255| +0#4040ff13#ffffff0@41
+|t|e|s|t| |t|e|x|t| |a|w|o|r|d> @59
+|~+0#4040ff13&| @7| +0#0000001#e0e0e08|w|r|d| @4|W| |e|x|t|r|a| |t|e|x|t| | 
+0#0000000#0000001| +0#0000001#e0e0e08|w|o|r|d|s| |a|r|e| |c|o@1|l| | 
+0#4040ff13#ffffff0@26
+|~| @7| +0#0000001#ffd7ff255|a|n|o|t|w|r|d| |W| |e|x|t|r|a| |t|e|x|t| | 
+0#0000000#0000001| +0#4040ff13#ffffff0@42
+|~| @7| +0#0000001#ffd7ff255|n|o|a|w|r|d| @1|W| |e|x|t|r|a| |t|e|x|t| | 
+0#0000000#a8a8a8255| +0#4040ff13#ffffff0@42
 |~| @73
 |~| @73
 |~| @73
diff --git a/src/testdir/dumps/Test_popupwin_infopopup_8.dump 
b/src/testdir/dumps/Test_popupwin_infopopup_8.dump
index 6838bcd8b..5b32d5265 100644
--- a/src/testdir/dumps/Test_popupwin_infopopup_8.dump
+++ b/src/testdir/dumps/Test_popupwin_infopopup_8.dump
@@ -1,8 +1,8 @@
 |a+0&#ffffff0|w|o|r|d| @69
-|t|e|s|t| |t|a|w|o|r|d> @63
-|~+0#4040ff13&| @3| +0#0000001#e0e0e08|w|r|d| @4|W| |e|x|t|r|a| |t|e|x|t| @1| 
+0#0000000#0000001| +0#0000001#e0e0e08|w|o|r|d|s| |a|r|e| |c|o@1|l| | 
+0#4040ff13#ffffff0@29
-|~| @3| +0#0000001#ffd7ff255|a|n|o|t|w|r|d| |W| |e|x|t|r|a| |t|e|x|t| @1| 
+0#0000000#0000001| +0#4040ff13#ffffff0@45
-|~| @3| +0#0000001#ffd7ff255|n|o|a|w|r|d| @1|W| |e|x|t|r|a| |t|e|x|t| @1| 
+0#0000000#a8a8a8255| +0#4040ff13#ffffff0@45
+|t|e|s|t| |t|e|a|w|o|r|d> @62
+|~+0#4040ff13&| @4| +0#0000001#e0e0e08|w|r|d| @4|W| |e|x|t|r|a| |t|e|x|t| | 
+0#0000000#0000001| +0#0000001#e0e0e08|w|o|r|d|s| |a|r|e| @1| 
+0#4040ff13#ffffff0@33
+|~| @4| +0#0000001#ffd7ff255|a|n|o|t|w|r|d| |W| |e|x|t|r|a| |t|e|x|t| | 
+0#0000000#0000001| +0#0000001#e0e0e08|c|o@1|l| @6| +0#4040ff13#ffffff0@33
+|~| @4| +0#0000001#ffd7ff255|n|o|a|w|r|d| @1|W| |e|x|t|r|a| |t|e|x|t| | 
+0#0000000#a8a8a8255| +0#4040ff13#ffffff0@45
 |~| @73
 |~| @73
 |~| @73
diff --git a/src/testdir/dumps/Test_popupwin_infopopup_9.dump 
b/src/testdir/dumps/Test_popupwin_infopopup_9.dump
deleted file mode 100644
index 4a5fb3b59..000000000
--- a/src/testdir/dumps/Test_popupwin_infopopup_9.dump
+++ /dev/null
@@ -1,14 +0,0 @@
-|a+0&#ffffff0|w|o|r|d| @69
-|t|e|s|a|w|o|r|d> @66
-|~+0#4040ff13&| | +0#0000001#e0e0e08|w|r|d| @4|W| |e|x|t|r|a| |t|e|x|t| @1| 
+0#0000000#0000001| +0#0000001#e0e0e08|w|o|r|d|s| |a|r|e| @1| 
+0#4040ff13#ffffff0@36
-|~| | +0#0000001#ffd7ff255|a|n|o|t|w|r|d| |W| |e|x|t|r|a| |t|e|x|t| @1| 
+0#0000000#0000001| +0#0000001#e0e0e08|c|o@1|l| @6| +0#4040ff13#ffffff0@36
-|~| | +0#0000001#ffd7ff255|n|o|a|w|r|d| @1|W| |e|x|t|r|a| |t|e|x|t| @1| 
+0#0000000#a8a8a8255| +0#4040ff13#ffffff0@48
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|-+2#0000000&@1| |U|s|e|r| |d|e|f|i|n|e|d| |c|o|m|p|l|e|t|i|o|n| 
|(|^|U|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@26
diff --git a/src/testdir/dumps/Test_popupwin_infopopup_wide_1.dump 
b/src/testdir/dumps/Test_popupwin_infopopup_wide_1.dump
index f7b583ba5..d6127060c 100644
--- a/src/testdir/dumps/Test_popupwin_infopopup_wide_1.dump
+++ b/src/testdir/dumps/Test_popupwin_infopopup_wide_1.dump
@@ -1,7 +1,7 @@
 |s+0&#ffffff0|c|r|a|p> @69
-|s+0#0000001#e0e0e08|c|r|a|p| @5|s|o|m|e| |l|o|n|g| |t|e|x|t| |t|o| |m|a|k|e| 
|s|u|r|e| |t|h|e| |m|e|n|u| |t|a|k|e|s| |u|p| |a|l@1| |o|f| |t|h|e| |w|i|d|t|h| 
|o
-|s+0&#ffd7ff255|c|a|p@1|i|e|r| @2|s|o|m|e| |l|o|n|g| |t|e|x|t| |t|o| |m|a|k|e| 
|s|u|r|e| |t|h|e| |m|e|n|u| |t|a|k|e|s| |u|p| |a|l@1| |o|f| |t|h|e| |w|i|d|t|h| 
|o
-|s|c|r|a|p@1|i|e|r|2| |s|o|m|e| |l|o|n|g| |t|e|x|t| |t|o| |m|a|k|e| |s|u|r|e| 
|t|h|e| |m|e|n|u| |t|a|k|e|s| |u|p| |a|l@1| |o|f| |t|h|e| |w|i|d|t|h| |o
+|s+0#0000001#e0e0e08|c|r|a|p| @5|s|o|m|e| |l|o|n|g| |t|e|x|t| |t|o| |m|a|k|e| 
|s|u|r|e| |t|h|e| |m|e|n|u| |t|a|k|e|s| |u|p| |a|l@1| |o|f| |t|h|e| |w|i|d|t|h| 
|>
+|s+0&#ffd7ff255|c|a|p@1|i|e|r| @2|s|o|m|e| |l|o|n|g| |t|e|x|t| |t|o| |m|a|k|e| 
|s|u|r|e| |t|h|e| |m|e|n|u| |t|a|k|e|s| |u|p| |a|l@1| |o|f| |t|h|e| |w|i|d|t|h| 
|>
+|s|c|r|a|p@1|i|e|r|2| |s|o|m|e| |l|o|n|g| |t|e|x|t| |t|o| |m|a|k|e| |s|u|r|e| 
|t|h|e| |m|e|n|u| |t|a|k|e|s| |u|p| |a|l@1| |o|f| |t|h|e| |w|i|d|t|h| |>
 |4+0#0000000#ffffff0| @73
 |5| @73
 |6| @73
diff --git a/src/testdir/dumps/Test_pum_completeitemalign_07.dump 
b/src/testdir/dumps/Test_pum_completeitemalign_07.dump
index 3b8acb9ce..a38c30232 100644
--- a/src/testdir/dumps/Test_pum_completeitemalign_07.dump
+++ b/src/testdir/dumps/Test_pum_completeitemalign_07.dump
@@ -1,6 +1,6 @@
 |l+0&#ffffff0|o@3|n|g|_|f|o@1> 
-|m+0#0000001#e0e0e08|e|n|u| |S| |l|o@3
-|m+0&#ffd7ff255|e|n|u| |T| |l|o@3
+|m+0#0000001#e0e0e08|e|n|u| |S| |l|o@2|>
+|m+0&#ffd7ff255|e|n|u| |T| |l|o@2|>
 |~+0#4040ff13#ffffff0| @10
 |~| @10
 |~| @10
diff --git a/src/testdir/dumps/Test_pum_maxwidth_07.dump 
b/src/testdir/dumps/Test_pum_maxwidth_07.dump
index 112e1f588..ada8acb0d 100644
--- a/src/testdir/dumps/Test_pum_maxwidth_07.dump
+++ b/src/testdir/dumps/Test_pum_maxwidth_07.dump
@@ -1,7 +1,7 @@
 |1+0&#ffffff0|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_|1|2|3|4|5|6|7|8|9|_> @44
 |1+0#0000001#e0e0e08|2|3|4|5|6|7|8|9|>| +0#4040ff13#ffffff0@64
 |一*0#0000001#ffd7ff255|二|三|四| +&|>| +0#4040ff13#ffffff0@64
-|a+0#0000001#ffd7ff255|b|c|d|e|f|g|h|i|j| +0#4040ff13#ffffff0@64
+|a+0#0000001#ffd7ff255|b|c|d|e|f|g|h|i|>| +0#4040ff13#ffffff0@64
 |上*0#0000001#ffd7ff255|下|左|右| +&@1| +0#4040ff13#ffffff0@64
 |~| @73
 |~| @73
diff --git a/src/testdir/dumps/Test_pum_maxwidth_08.dump 
b/src/testdir/dumps/Test_pum_maxwidth_08.dump
index 9f92ae706..aa41b76d1 100644
--- a/src/testdir/dumps/Test_pum_maxwidth_08.dump
+++ b/src/testdir/dumps/Test_pum_maxwidth_08.dump
@@ -1,7 +1,7 @@
 | +0&#ffffff0@43> |_|9|8|7|6|5|4|3|2|1|_|9|8|7|6|5|4|3|2|1|_|9|8|7|6|5|4|3|2|1
 | +0#4040ff13&@64|<+0#0000001#e0e0e08|9|8|7|6|5|4|3|2|1
 | +0#4040ff13#ffffff0@64|<+0#0000001#ffd7ff255| |四*&|三|二|一
-| +0#4040ff13#ffffff0@64|j+0#0000001#ffd7ff255|i|h|g|f|e|d|c|b|a
+| +0#4040ff13#ffffff0@64|<+0#0000001#ffd7ff255|i|h|g|f|e|d|c|b|a
 | +0#4040ff13#ffffff0@64| +0#0000001#ffd7ff255@1|右*&|左|下|上
 | +0#4040ff13#ffffff0@73|~
 | @73|~
diff --git a/src/testdir/dumps/Test_pum_maxwidth_21.dump 
b/src/testdir/dumps/Test_pum_maxwidth_21.dump
index 53def2cfc..a94eb2fc4 100644
--- a/src/testdir/dumps/Test_pum_maxwidth_21.dump
+++ b/src/testdir/dumps/Test_pum_maxwidth_21.dump
@@ -1,7 +1,7 @@
 |f+0&#ffffff0|o@1> @71
 |f+0#0000001#e0e0e08|o@1| @7|f|o@1|K|>| +0#4040ff13#ffffff0@58
 |b+0#0000001#ffd7ff255|a|r| @7|一*&|二|>+&| +0#4040ff13#ffffff0@58
-|一*0#0000001#ffd7ff255|二|三|四|五| +&|m|u|l|t|i| +0#4040ff13#ffffff0@58
+|一*0#0000001#ffd7ff255|二|三|四|五| +&|m|u|l|t|>| +0#4040ff13#ffffff0@58
 |~| @73
 |~| @73
 |~| @73
diff --git a/src/testdir/dumps/Test_pum_maxwidth_22.dump 
b/src/testdir/dumps/Test_pum_maxwidth_22.dump
index fa95a1ead..573279785 100644
--- a/src/testdir/dumps/Test_pum_maxwidth_22.dump
+++ b/src/testdir/dumps/Test_pum_maxwidth_22.dump
@@ -1,7 +1,7 @@
 | +0&#ffffff0@70> |o@1|f
 | +0#4040ff13&@58|<+0#0000001#e0e0e08|K|o@1|f| @7|o@1|f
 | +0#4040ff13#ffffff0@58|<+0#0000001#ffd7ff255|二*&|一| +&@7|r|a|b
-| +0#4040ff13#ffffff0@58|i+0#0000001#ffd7ff255|t|l|u|m| |五*&|四|三|二|一
+| +0#4040ff13#ffffff0@58|<+0#0000001#ffd7ff255|t|l|u|m| |五*&|四|三|二|一
 | +0#4040ff13#ffffff0@73|~
 | @73|~
 | @73|~
diff --git a/src/testdir/dumps/Test_pum_rightleft_01.dump 
b/src/testdir/dumps/Test_pum_rightleft_01.dump
index 8e8f6b4bc..cf6d2e977 100644
--- a/src/testdir/dumps/Test_pum_rightleft_01.dump
+++ b/src/testdir/dumps/Test_pum_rightleft_01.dump
@@ -3,6 +3,6 @@
 | @71|m|i|v
 | @67|y|r|o|t|c|i|v
 | @66> |y|r|o|t|c|i|v
-|w+0#0000001#ffd7ff255|v|u|t|s|r|q|p|o|n|m|l|k|j|i|h|g|f|e|d|c|b|a|z|y|x|w|v|u|t|s|r|q|p|o|n|m|l|k|j|i|h|g|f|e|d|c|b|a|z|y|x|w|v|u|t|s|r|q|p|o|n|m|l|k|j|i|h|g|f|e|d|c|b|a
+|<+0#0000001#ffd7ff255|v|u|t|s|r|q|p|o|n|m|l|k|j|i|h|g|f|e|d|c|b|a|z|y|x|w|v|u|t|s|r|q|p|o|n|m|l|k|j|i|h|g|f|e|d|c|b|a|z|y|x|w|v|u|t|s|r|q|p|o|n|m|l|k|j|i|h|g|f|e|d|c|b|a
 | @71|m|i|v
 | +0&#e0e0e08@67|y|r|o|t|c|i|v
diff --git a/src/testdir/dumps/Test_wildmenu_pum_odd_wildchar_1.dump 
b/src/testdir/dumps/Test_wildmenu_pum_odd_wildchar_1.dump
index b5825eb19..36acf9fb4 100644
--- a/src/testdir/dumps/Test_wildmenu_pum_odd_wildchar_1.dump
+++ b/src/testdir/dumps/Test_wildmenu_pum_odd_wildchar_1.dump
@@ -1,10 +1,10 @@
-| +0#0000001#e0e0e08|!| @14| +0#0000000#0000001| +0&#ffffff0@56
-| +0#0000001#ffd7ff255|#| @14| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|&| @14| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|*| @14| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|+@1| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|-@1| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|<| @14| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|=| @14| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|>| @14| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
+| +0#0000001#e0e0e08|!| @13| +0#0000000#0000001| +0&#ffffff0@57
+| +0#0000001#ffd7ff255|#| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|&| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|*| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|+@1| @12| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|-@1| @12| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|<| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|=| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|>| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
 |:+0#0000000&|!> @72
diff --git a/src/testdir/dumps/Test_wildmenu_pum_odd_wildchar_2.dump 
b/src/testdir/dumps/Test_wildmenu_pum_odd_wildchar_2.dump
index 2887895b6..f91223920 100644
--- a/src/testdir/dumps/Test_wildmenu_pum_odd_wildchar_2.dump
+++ b/src/testdir/dumps/Test_wildmenu_pum_odd_wildchar_2.dump
@@ -1,10 +1,10 @@
-| +0#0000001#ffd7ff255|!| @14| +0#0000000#0000001| +0&#ffffff0@56
-| +0#0000001#e0e0e08|#| @14| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|&| @14| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|*| @14| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|+@1| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|-@1| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|<| @14| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|=| @14| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
-| +0#0000001#ffd7ff255|>| @14| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@56
+| +0#0000001#ffd7ff255|!| @13| +0#0000000#0000001| +0&#ffffff0@57
+| +0#0000001#e0e0e08|#| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|&| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|*| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|+@1| @12| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|-@1| @12| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|<| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|=| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
+| +0#0000001#ffd7ff255|>| @13| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@57
 |:+0#0000000&|#> @72
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index bd0e81e84..eca0a5a68 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -3682,6 +3682,7 @@ func Test_popupmenu_info_border()
   " Test that the popupmenu's scrollbar and infopopup do not overlap
   call term_sendkeys(buf, "\<Esc>")
   call term_sendkeys(buf, ":set pumheight=3\<CR>")
+  call term_sendkeys(buf, ":set completepopup=border:off\<CR>")
   call term_sendkeys(buf, "cc\<C-X>\<C-U>")
   call VerifyScreenDump(buf, 'Test_popupwin_infopopup_6', {})
 
@@ -3695,15 +3696,10 @@ func Test_popupmenu_info_border()
   call VerifyScreenDump(buf, 'Test_popupwin_infopopup_7', {})
 
   " Test that when the option is changed the popup changes.
-  call term_sendkeys(buf, "\<Esc>")
-  call term_sendkeys(buf, ":set completepopup=border:off\<CR>")
-  call term_sendkeys(buf, "a\<C-X>\<C-U>")
-  call VerifyScreenDump(buf, 'Test_popupwin_infopopup_8', {})
-
   call term_sendkeys(buf, " \<Esc>")
   call term_sendkeys(buf, ":set completepopup+=width:10\<CR>")
   call term_sendkeys(buf, "a\<C-X>\<C-U>")
-  call VerifyScreenDump(buf, 'Test_popupwin_infopopup_9', {})
+  call VerifyScreenDump(buf, 'Test_popupwin_infopopup_8', {})
 
   call term_sendkeys(buf, "\<Esc>")
   call StopVimInTerminal(buf)
diff --git a/src/version.c b/src/version.c
index 27a416b8b..016f73f87 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1817,
 /**/
     1816,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1v43vk-005x8A-3a%40256bit.org.

Raspunde prin e-mail lui