From 7948a2c3d8b6971663a6a9a34a35653aa93db09e Mon Sep 17 00:00:00 2001 From: Hirohito Higashi Date: Tue, 23 Jun 2026 21:02:46 +0000 Subject: [PATCH] patch 9.2.0713: completion: ruler not updated correctly when the popup menu is visible Problem: While the insert-mode completion popup menu is visible, the ruler - and the ruler shown in a status line when 'laststatus' is set - shows the column where the completion started instead of the real cursor column. With a status line the ruler can also stay at the column from before the completion until the next key is pressed. Solution: Position the popup menu at the completion start column without moving the cursor there, so the ruler keeps reflecting the real cursor column. Also mark the status line for redraw before the menu is shown, so its ruler is updated for the real cursor column while the menu is visible. closes: #20626 Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- src/cmdexpand.c | 2 +- src/insexpand.c | 23 ++++++++----------- src/popupmenu.c | 18 +++++++-------- src/proto/popupmenu.pro | 2 +- .../dumps/Test_autocompletedelay_1.dump | 2 +- .../dumps/Test_autocompletedelay_4.dump | 2 +- .../Test_autocompletedelay_longest_2.dump | 2 +- .../Test_autocompletedelay_longest_4.dump | 2 +- .../Test_autocompletedelay_preinsert_2.dump | 2 +- .../dumps/Test_fuzzy_autocompletedelay_1.dump | 2 +- .../dumps/Test_fuzzy_autocompletedelay_2.dump | 2 +- ...fo_popupwin_clears_cmdline_on_hide_01.dump | 2 +- .../Test_popup_and_previewwindow_pbuffer.dump | 2 +- .../Test_popup_and_previewwindow_pedit.dump | 2 +- src/testdir/dumps/Test_pum_highlights_09.dump | 2 +- src/testdir/dumps/Test_pum_matchins_11.dump | 2 +- .../dumps/Test_pum_statusline_ruler_1.dump | 8 +++++++ .../dumps/Test_pum_with_preview_win.dump | 2 +- .../Test_pum_with_special_characters_13.dump | 2 +- .../dumps/Test_pumopt_opacity_text_attrs.dump | 2 +- ...est_pumopt_opacity_textprop_undercurl.dump | 2 +- .../dumps/Test_pumopt_opacity_wide_bg.dump | 2 +- .../Test_pumopt_opacity_wide_bg_shifted.dump | 2 +- .../dumps/Test_shortmess_complmsg_2.dump | 2 +- src/testdir/dumps/Test_winhighlight_8.dump | 2 +- src/testdir/dumps/Test_winhighlight_9.dump | 2 +- src/testdir/test_ins_complete.vim | 18 +++++++++++++++ src/version.c | 2 ++ 28 files changed, 69 insertions(+), 46 deletions(-) create mode 100644 src/testdir/dumps/Test_pum_statusline_ruler_1.dump diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 496ab7b883..961ced5773 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -458,7 +458,7 @@ cmdline_pum_display(void) { if (p_po > 0 && p_po < 100 && !pum_redraw_in_same_position()) pum_call_update_screen(); - pum_display(compl_match_array, compl_match_arraysize, compl_selected); + pum_display(compl_match_array, compl_match_arraysize, compl_selected, -1); } /* diff --git a/src/insexpand.c b/src/insexpand.c index 3b20d2a3c7..f5ad940081 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -1889,22 +1889,19 @@ ins_compl_show_pum(void) // part of the screen would be updated. We do need to redraw here. dollar_vcol = -1; - // Compute the screen column of the start of the completed text. - // Use the cursor to get all wrapping and other settings right. + // Position the menu at the completion start without moving the cursor + // there, so the ruler keeps showing the real cursor column. col = curwin->w_cursor.col; curwin->w_cursor.col = compl_col; - compl_selected_item = cur; - pum_display(compl_match_array, compl_match_arraysize, cur); + validate_cursor_col(); + int pum_wcol = curwin->w_wcol; curwin->w_cursor.col = col; - -#ifdef FEAT_CONCEAL - // The cursor was temporarily moved to "compl_col" above to position the - // menu, so the screen update left w_wcol conceal-corrected for that column - // rather than for the real cursor. Redraw the cursor line so the caret is - // positioned correctly when the cursor line has concealed text. - if (curwin->w_p_cole > 0 && conceal_cursor_line(curwin)) - redrawWinline(curwin, curwin->w_cursor.lnum); -#endif + validate_cursor_col(); + compl_selected_item = cur; + // Flag the status line so the ruler is redrawn for the real cursor column + // when the menu update redraws the screen. + curwin->w_redr_status = true; + pum_display(compl_match_array, compl_match_arraysize, cur, pum_wcol); // After adding leader, set the current match to shown match. if (compl_started && compl_curr_match != compl_shown_match) diff --git a/src/popupmenu.c b/src/popupmenu.c index bed2495b87..08aa442865 100644 --- a/src/popupmenu.c +++ b/src/popupmenu.c @@ -290,8 +290,10 @@ pum_compute_horizontal_placement(int cursor_col) pum_display( pumitem_T *array, int size, - int selected) // index of initially selected item, -1 if + int selected, // index of initially selected item, -1 if // out of range + int pum_wcol) // screen column to align the menu to, or -1 + // to use the cursor column { int cursor_col; int above_row; @@ -326,7 +328,7 @@ pum_display( pum_win_row = curwin->w_wrow + W_WINROW(curwin); pum_win_height = curwin->w_height; pum_win_col = curwin->w_wincol; - pum_win_wcol = curwin->w_wcol; + pum_win_wcol = pum_wcol >= 0 ? pum_wcol : curwin->w_wcol; pum_win_width = curwin->w_width; #if defined(FEAT_QUICKFIX) @@ -359,8 +361,9 @@ pum_display( cursor_col = cmdline_compl_startcol(); else { - // w_wcol includes virtual text "above" - int wcol = curwin->w_wcol % curwin->w_width; + int wcol = pum_wcol >= 0 ? pum_wcol : curwin->w_wcol; + // w_wcol includes virtual text "above". + wcol %= curwin->w_width; #ifdef FEAT_CONCEAL // w_wcol does not account for text concealed before the cursor; // shift by the offset win_line() recorded for the cursor line so the @@ -1671,16 +1674,11 @@ pum_may_redraw(void) } else { - int wcol = curwin->w_wcol; - // Window layout changed, recompute the position. // Use the remembered w_wcol value, the cursor may have moved when a // completion was inserted, but we want the menu in the same position. pum_undisplay(); - curwin->w_wcol = pum_win_wcol; - curwin->w_valid |= VALID_WCOL; - pum_display(array, len, selected); - curwin->w_wcol = wcol; + pum_display(array, len, selected, pum_win_wcol); } } diff --git a/src/proto/popupmenu.pro b/src/proto/popupmenu.pro index 4afd678125..f7a00511cf 100644 --- a/src/proto/popupmenu.pro +++ b/src/proto/popupmenu.pro @@ -2,7 +2,7 @@ void pum_set_border(int enable); void pum_set_shadow(int enable); void pum_set_margin(int enable); -void pum_display(pumitem_T *array, int size, int selected); +void pum_display(pumitem_T *array, int size, int selected, int pum_wcol); void pum_call_update_screen(void); int pum_under_menu(int row, int col, int only_redrawing); void pum_opacity_changed(void); diff --git a/src/testdir/dumps/Test_autocompletedelay_1.dump b/src/testdir/dumps/Test_autocompletedelay_1.dump index 51128fc2f3..c792e09ea9 100644 --- a/src/testdir/dumps/Test_autocompletedelay_1.dump +++ b/src/testdir/dumps/Test_autocompletedelay_1.dump @@ -7,4 +7,4 @@ |f+0#0000001#ffd7ff255|o@1| @11| +0#4040ff13#ffffff0@59 |~| @73 |~| @73 -|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|4|,|1| @10|T|o|p| +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|4|,|2| @10|A|l@1| diff --git a/src/testdir/dumps/Test_autocompletedelay_4.dump b/src/testdir/dumps/Test_autocompletedelay_4.dump index 53199f9d60..31d58c55c1 100644 --- a/src/testdir/dumps/Test_autocompletedelay_4.dump +++ b/src/testdir/dumps/Test_autocompletedelay_4.dump @@ -7,4 +7,4 @@ |f+0#0000001#ffd7ff255|o@1| @11| +0#4040ff13#ffffff0@59 |~| @73 |~| @73 -|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|4|,|1| @10|A|l@1| +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|4|,|3| @10|A|l@1| diff --git a/src/testdir/dumps/Test_autocompletedelay_longest_2.dump b/src/testdir/dumps/Test_autocompletedelay_longest_2.dump index 19a83bfa78..8d7eabd605 100644 --- a/src/testdir/dumps/Test_autocompletedelay_longest_2.dump +++ b/src/testdir/dumps/Test_autocompletedelay_longest_2.dump @@ -7,4 +7,4 @@ |~| @73 |~| @73 |~| @73 -|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|3|,|1| @10|T|o|p| +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|3|,|6| @10|A|l@1| diff --git a/src/testdir/dumps/Test_autocompletedelay_longest_4.dump b/src/testdir/dumps/Test_autocompletedelay_longest_4.dump index 09a8514da0..95a4857bd2 100644 --- a/src/testdir/dumps/Test_autocompletedelay_longest_4.dump +++ b/src/testdir/dumps/Test_autocompletedelay_longest_4.dump @@ -7,4 +7,4 @@ |~| @73 |~| @73 |~| @73 -|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|3|,|1| @10|A|l@1| +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|3|,|3| @10|A|l@1| diff --git a/src/testdir/dumps/Test_autocompletedelay_preinsert_2.dump b/src/testdir/dumps/Test_autocompletedelay_preinsert_2.dump index 17252dfa3e..6b6520925e 100644 --- a/src/testdir/dumps/Test_autocompletedelay_preinsert_2.dump +++ b/src/testdir/dumps/Test_autocompletedelay_preinsert_2.dump @@ -7,4 +7,4 @@ |~| @73 |~| @73 |~| @73 -|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|3|,|1| @10|A|l@1| +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|3|,|3| @10|A|l@1| diff --git a/src/testdir/dumps/Test_fuzzy_autocompletedelay_1.dump b/src/testdir/dumps/Test_fuzzy_autocompletedelay_1.dump index ed15dc9627..b82983f94b 100644 --- a/src/testdir/dumps/Test_fuzzy_autocompletedelay_1.dump +++ b/src/testdir/dumps/Test_fuzzy_autocompletedelay_1.dump @@ -7,4 +7,4 @@ |~| @73 |~| @73 |~| @73 -|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|4|,|1| @10|T|o|p| +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|4|,|3| @10|A|l@1| diff --git a/src/testdir/dumps/Test_fuzzy_autocompletedelay_2.dump b/src/testdir/dumps/Test_fuzzy_autocompletedelay_2.dump index 84083f6634..550f1e154c 100644 --- a/src/testdir/dumps/Test_fuzzy_autocompletedelay_2.dump +++ b/src/testdir/dumps/Test_fuzzy_autocompletedelay_2.dump @@ -7,4 +7,4 @@ |v+0#0000001#ffd7ff255|i|m| @11| +0#4040ff13#ffffff0@59 |~| @73 |~| @73 -|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|4|,|1| @10|A|l@1| +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|4|,|2| @10|A|l@1| diff --git a/src/testdir/dumps/Test_info_popupwin_clears_cmdline_on_hide_01.dump b/src/testdir/dumps/Test_info_popupwin_clears_cmdline_on_hide_01.dump index 27947cd33f..b098b70f6d 100644 --- a/src/testdir/dumps/Test_info_popupwin_clears_cmdline_on_hide_01.dump +++ b/src/testdir/dumps/Test_info_popupwin_clears_cmdline_on_hide_01.dump @@ -12,4 +12,4 @@ |f+0#0000001#ffd7ff255|o|u|r| @10| +0#0000000#ffffff0@59 |f+0#0000001#e0e0e08|i|v|e| @11|o|n|e| @2| +0#0000000#ffffff0@52 |f|i|v|e> @10| +0#0000001#e0e0e08|t|w|o| @2| +0#0000000#ffffff0@52 -|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@2| +0#0000001#e0e0e08|t|h|r|e@1| | +0#0000000#ffffff0@34|1|6|,|1| @9|B|o|t| +|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@2| +0#0000001#e0e0e08|t|h|r|e@1| | +0#0000000#ffffff0@34|1|6|,|5| @9|B|o|t| diff --git a/src/testdir/dumps/Test_popup_and_previewwindow_pbuffer.dump b/src/testdir/dumps/Test_popup_and_previewwindow_pbuffer.dump index 0eab2a62c6..e01908c6b1 100644 --- a/src/testdir/dumps/Test_popup_and_previewwindow_pbuffer.dump +++ b/src/testdir/dumps/Test_popup_and_previewwindow_pbuffer.dump @@ -16,5 +16,5 @@ |a|b|0> @71 |~+0#4040ff13&| @73 |~| @73 -|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1@1|,|1| @10|B|o|t +|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1@1|,|4| @10|B|o|t |-+2&&@1| |K|e|y|w|o|r|d| |L|o|c|a|l| |c|o|m|p|l|e|t|i|o|n| |(|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |1|0| +0#0000000&@26 diff --git a/src/testdir/dumps/Test_popup_and_previewwindow_pedit.dump b/src/testdir/dumps/Test_popup_and_previewwindow_pedit.dump index b235c7d511..fe27c9d6c1 100644 --- a/src/testdir/dumps/Test_popup_and_previewwindow_pedit.dump +++ b/src/testdir/dumps/Test_popup_and_previewwindow_pedit.dump @@ -16,5 +16,5 @@ |a+0#0000001#ffd7ff255|b|6| @11| +0#0000000#a8a8a8255| +0&#ffffff0@58 |a|b|0> @71 |~+0#4040ff13&| @73 -|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1@1|,|1| @10|B|o|t +|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1@1|,|4| @10|B|o|t |-+2&&@1| |K|e|y|w|o|r|d| |L|o|c|a|l| |c|o|m|p|l|e|t|i|o|n| |(|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |1|0| +0#0000000&@26 diff --git a/src/testdir/dumps/Test_pum_highlights_09.dump b/src/testdir/dumps/Test_pum_highlights_09.dump index 4e7d08b793..552f3361a2 100644 --- a/src/testdir/dumps/Test_pum_highlights_09.dump +++ b/src/testdir/dumps/Test_pum_highlights_09.dump @@ -17,4 +17,4 @@ |~| @73 |~| @73 |~| @73 -|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|1| @10|A|l@1| +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|2| @10|A|l@1| diff --git a/src/testdir/dumps/Test_pum_matchins_11.dump b/src/testdir/dumps/Test_pum_matchins_11.dump index a44a6ee566..d11ba8c048 100644 --- a/src/testdir/dumps/Test_pum_matchins_11.dump +++ b/src/testdir/dumps/Test_pum_matchins_11.dump @@ -16,5 +16,5 @@ |~| @73 |~| @73 |~| @73 -|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|1| @11|A|l@1 +|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|4| @11|A|l@1 |-+2&&@1| |O|m|n|i| |c|o|m|p|l|e|t|i|o|n| |(|^|O|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |3| +0#0000000&@34 diff --git a/src/testdir/dumps/Test_pum_statusline_ruler_1.dump b/src/testdir/dumps/Test_pum_statusline_ruler_1.dump new file mode 100644 index 0000000000..43de9b69f4 --- /dev/null +++ b/src/testdir/dumps/Test_pum_statusline_ruler_1.dump @@ -0,0 +1,8 @@ +|a+0&#ffffff0@1| |a@2| |a@1> @30 +|~+0#4040ff13&| @4| +0#0000001#e0e0e08|a@1| @12| +0#4040ff13#ffffff0@17 +|~| @4| +0#0000001#ffd7ff255|a@2| @11| +0#4040ff13#ffffff0@17 +|~| @38 +|~| @38 +|~| @38 +|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @8|1|,|1|0| @10|A|l@1 +|-+2&&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |2| +0#0000000&@24 diff --git a/src/testdir/dumps/Test_pum_with_preview_win.dump b/src/testdir/dumps/Test_pum_with_preview_win.dump index ad0df78146..d2487bfdb6 100644 --- a/src/testdir/dumps/Test_pum_with_preview_win.dump +++ b/src/testdir/dumps/Test_pum_with_preview_win.dump @@ -8,5 +8,5 @@ |t+0#0000001#ffd7ff255|h|r|e@1| @9| +0#4040ff13#ffffff0@59 |~| @73 |~| @73 -|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|1| @11|A|l@1 +|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|4| @11|A|l@1 |-+2&&@1| |O|m|n|i| |c|o|m|p|l|e|t|i|o|n| |(|^|O|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |3| +0#0000000&@34 diff --git a/src/testdir/dumps/Test_pum_with_special_characters_13.dump b/src/testdir/dumps/Test_pum_with_special_characters_13.dump index 313d500783..3ed2c9573d 100644 --- a/src/testdir/dumps/Test_pum_with_special_characters_13.dump +++ b/src/testdir/dumps/Test_pum_with_special_characters_13.dump @@ -9,4 +9,4 @@ |~| @73 |~| @73 |~| @73 -|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|3|,|1| @10|A|l@1| +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|3|,|5| @10|A|l@1| diff --git a/src/testdir/dumps/Test_pumopt_opacity_text_attrs.dump b/src/testdir/dumps/Test_pumopt_opacity_text_attrs.dump index 62e7df726b..1d708e641b 100644 --- a/src/testdir/dumps/Test_pumopt_opacity_text_attrs.dump +++ b/src/testdir/dumps/Test_pumopt_opacity_text_attrs.dump @@ -17,4 +17,4 @@ |ほ*&|げ|ほ|げ|ほ|げ|漢*4#e000e06&|字|テ|ス|ト|あ*0#0000000&|い|う|え|お|カ|タ|カ|ナ| +&@34 |ほ*&|げ|ほ|げ|ほ|げ|漢*4#e000e06&|字|テ|ス|ト|あ*0#0000000&|い|う|え|お|カ|タ|カ|ナ| +&@34 |ほ*&|げ|ほ|げ|ほ|げ|漢*4#e000e06&|字|テ|ス|ト|あ*0#0000000&|い|う|え|お|カ|タ|カ|ナ| +&@34 -|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|1| @10|T|o|p| +|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|7|-|5| @8|T|o|p| diff --git a/src/testdir/dumps/Test_pumopt_opacity_textprop_undercurl.dump b/src/testdir/dumps/Test_pumopt_opacity_textprop_undercurl.dump index a1242fde84..2558f5bf1a 100644 --- a/src/testdir/dumps/Test_pumopt_opacity_textprop_undercurl.dump +++ b/src/testdir/dumps/Test_pumopt_opacity_textprop_undercurl.dump @@ -17,4 +17,4 @@ |~| @73 |~| @73 |~| @73 -|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|1| @10|A|l@1| +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|1|3| @9|A|l@1| diff --git a/src/testdir/dumps/Test_pumopt_opacity_wide_bg.dump b/src/testdir/dumps/Test_pumopt_opacity_wide_bg.dump index 6b9bb9935a..23c67a84cf 100644 --- a/src/testdir/dumps/Test_pumopt_opacity_wide_bg.dump +++ b/src/testdir/dumps/Test_pumopt_opacity_wide_bg.dump @@ -17,4 +17,4 @@ |ほ*&|げ|ほ|げ|ほ|げ|漢|字|テ|ス|ト|あ|い|う|え|お|カ|タ|カ|ナ| +&@34 |ほ*&|げ|ほ|げ|ほ|げ|漢|字|テ|ス|ト|あ|い|う|え|お|カ|タ|カ|ナ| +&@34 |ほ*&|げ|ほ|げ|ほ|げ|漢|字|テ|ス|ト|あ|い|う|え|お|カ|タ|カ|ナ| +&@34 -|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|1| @10|T|o|p| +|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|7|-|5| @8|T|o|p| diff --git a/src/testdir/dumps/Test_pumopt_opacity_wide_bg_shifted.dump b/src/testdir/dumps/Test_pumopt_opacity_wide_bg_shifted.dump index f67556307b..4aee9cd6aa 100644 --- a/src/testdir/dumps/Test_pumopt_opacity_wide_bg_shifted.dump +++ b/src/testdir/dumps/Test_pumopt_opacity_wide_bg_shifted.dump @@ -17,4 +17,4 @@ |a|ほ*&|げ|ほ|げ|ほ|げ|漢|字|テ|ス|ト|あ|い|う|え|お|カ|タ|カ|ナ| +&@33 |ほ*&|げ|ほ|げ|ほ|げ|漢|字|テ|ス|ト|あ|い|う|え|お|カ|タ|カ|ナ| +&@34 |a|ほ*&|げ|ほ|げ|ほ|げ|漢|字|テ|ス|ト|あ|い|う|え|お|カ|タ|カ|ナ| +&@33 -|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|1| @10|T|o|p| +|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|7|-|5| @8|T|o|p| diff --git a/src/testdir/dumps/Test_shortmess_complmsg_2.dump b/src/testdir/dumps/Test_shortmess_complmsg_2.dump index 66c421b59a..99d03a4ec7 100644 --- a/src/testdir/dumps/Test_shortmess_complmsg_2.dump +++ b/src/testdir/dumps/Test_shortmess_complmsg_2.dump @@ -9,4 +9,4 @@ |~| @73 |~| @73 |~| @73 -|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|4|,|1| @10|A|l@1| +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|4|,|6| @10|A|l@1| diff --git a/src/testdir/dumps/Test_winhighlight_8.dump b/src/testdir/dumps/Test_winhighlight_8.dump index 69568fc95c..c5ff052503 100644 --- a/src/testdir/dumps/Test_winhighlight_8.dump +++ b/src/testdir/dumps/Test_winhighlight_8.dump @@ -4,5 +4,5 @@ |w+0#0000001#ffd7ff255|a+0#ffffff16#e000002|l@1| @10| +0#0000000#a8a8a8255| +0&#ffffff0@20||+1&&|S+0&&|i|x| @33 |w+0#0000001#ffd7ff255|h+0#ffffff16#e000002|i|l|e| @9| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@20||+1#0000000&|~+0#4040ff13&| @35 |w+0#0000001#ffd7ff255|i+0#ffffff16#e000002|n|c|m|d| @8| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@20||+1#0000000&|~+0#4040ff13&| @35 -|w+0#0000001#ffd7ff255|i+0#ffffff16#e000002|n|d|o| @9| +0#0000000#a8a8a8255| +3&#ffffff0@2|1|,|1| @11|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1 +|w+0#0000001#ffd7ff255|i+0#ffffff16#e000002|n|d|o| @9| +0#0000000#a8a8a8255| +3&#ffffff0@2|1|,|6| @11|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1 |-+2&&@1| |C|o|m@1|a|n|d|-|l|i|n|e| |c|o|m|p|l|e|t|i|o|n| |(|^|V|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |1|5| +0#0000000&@25 diff --git a/src/testdir/dumps/Test_winhighlight_9.dump b/src/testdir/dumps/Test_winhighlight_9.dump index 174531af71..67877d0889 100644 --- a/src/testdir/dumps/Test_winhighlight_9.dump +++ b/src/testdir/dumps/Test_winhighlight_9.dump @@ -4,5 +4,5 @@ |S|i|x| @33| +0#0000001#ffd7ff255|w|a|l@1| @10| +0#0000000#a8a8a8255| +0&#ffffff0@20 |~+0#4040ff13&| @35| +0#0000001#ffd7ff255|w|h|i|l|e| @9| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@20 |~| @35| +0#0000001#ffd7ff255|w|i|n|c|m|d| @8| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@20 -|[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|5| @11|A|l@1| +0#0000001#ffd7ff255|w|i|n|d|o| @9| +0#0000000#a8a8a8255| +3&#ffffff0@2|1|,|1| @11|A|l@1 +|[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|5| @11|A|l@1| +0#0000001#ffd7ff255|w|i|n|d|o| @9| +0#0000000#a8a8a8255| +3&#ffffff0@2|1|,|6| @11|A|l@1 |-+2&&@1| |C|o|m@1|a|n|d|-|l|i|n|e| |c|o|m|p|l|e|t|i|o|n| |(|^|V|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |1|5| +0#0000000&@25 diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index cb901d609f..4df2efb061 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -1025,6 +1025,24 @@ func Test_pum_with_preview_win() call StopVimInTerminal(buf) endfunc +func Test_pum_statusline_ruler() + CheckScreendump + + " With a status line, the ruler must follow the real cursor column after a + " completion inserts text, not stay at the completion start column. + let lines =<< trim END + call setline(1, 'aa aaa ') + set laststatus=2 ruler + END + call writefile(lines, 'Xstlruler', 'D') + let buf = RunVimInTerminal('-S Xstlruler', #{rows: 8, cols: 40}) + call term_sendkeys(buf, "A\") + call VerifyScreenDump(buf, 'Test_pum_statusline_ruler_1', {}) + + call term_sendkeys(buf, "\") + call StopVimInTerminal(buf) +endfunc + func Test_scrollbar_on_wide_char() CheckScreendump diff --git a/src/version.c b/src/version.c index b03ecdf307..02d7bc410e 100644 --- a/src/version.c +++ b/src/version.c @@ -759,6 +759,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 713, /**/ 712, /**/ -- 2.47.3