]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0713: completion: ruler not updated correctly when the popup menu is visible v9.2.0713
authorHirohito Higashi <h.east.727@gmail.com>
Tue, 23 Jun 2026 21:02:46 +0000 (21:02 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 23 Jun 2026 21:02:46 +0000 (21:02 +0000)
commit7948a2c3d8b6971663a6a9a34a35653aa93db09e
tree7f5b7edf5d6dc2ab8afe1a6e00dbf546e1b08f4c
parent5c1b989b4aabf1549910752dcfb44030e64edfcc
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) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
28 files changed:
src/cmdexpand.c
src/insexpand.c
src/popupmenu.c
src/proto/popupmenu.pro
src/testdir/dumps/Test_autocompletedelay_1.dump
src/testdir/dumps/Test_autocompletedelay_4.dump
src/testdir/dumps/Test_autocompletedelay_longest_2.dump
src/testdir/dumps/Test_autocompletedelay_longest_4.dump
src/testdir/dumps/Test_autocompletedelay_preinsert_2.dump
src/testdir/dumps/Test_fuzzy_autocompletedelay_1.dump
src/testdir/dumps/Test_fuzzy_autocompletedelay_2.dump
src/testdir/dumps/Test_info_popupwin_clears_cmdline_on_hide_01.dump
src/testdir/dumps/Test_popup_and_previewwindow_pbuffer.dump
src/testdir/dumps/Test_popup_and_previewwindow_pedit.dump
src/testdir/dumps/Test_pum_highlights_09.dump
src/testdir/dumps/Test_pum_matchins_11.dump
src/testdir/dumps/Test_pum_statusline_ruler_1.dump [new file with mode: 0644]
src/testdir/dumps/Test_pum_with_preview_win.dump
src/testdir/dumps/Test_pum_with_special_characters_13.dump
src/testdir/dumps/Test_pumopt_opacity_text_attrs.dump
src/testdir/dumps/Test_pumopt_opacity_textprop_undercurl.dump
src/testdir/dumps/Test_pumopt_opacity_wide_bg.dump
src/testdir/dumps/Test_pumopt_opacity_wide_bg_shifted.dump
src/testdir/dumps/Test_shortmess_complmsg_2.dump
src/testdir/dumps/Test_winhighlight_8.dump
src/testdir/dumps/Test_winhighlight_9.dump
src/testdir/test_ins_complete.vim
src/version.c