]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1521: completion: pum does not reset scroll pos on reopen with 'noselect' v9.1.1521
authorGirish Palya <girishji@gmail.com>
Mon, 7 Jul 2025 17:47:53 +0000 (19:47 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 7 Jul 2025 17:47:53 +0000 (19:47 +0200)
commit0cd7f3536bde47cf9693090b839abf88c7f019c8
tree6349a7c6b8c83d0edff6ad75514045b769dcf3f5
parentaf220077848dd5d0d303c1ac262692351b90f212
patch 9.1.1521: completion: pum does not reset scroll pos on reopen with 'noselect'

Problem:  When 'wildmode' is set to include "noselect", the popup menu (pum)
          incorrectly retained its scroll position when reopened. This
          meant that after scrolling down through the menu with `<C-n>`,
          reopening the menu (e.g., by retyping the command and
          triggering completion again) would show the menu starting from
          the previously scrolled position, rather than from the top.
          This could confuse users, as the first visible item would not
          be the first actual match in the list.

Solution: Ensure that the popup menu resets its scroll position to the
          top when reopened (Girish Palya).

closes: #17673

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/cmdexpand.c
src/testdir/dumps/Test_pum_scroll_noselect_1.dump [new file with mode: 0644]
src/testdir/dumps/Test_pum_scroll_noselect_2.dump [new file with mode: 0644]
src/testdir/test_cmdline.vim
src/version.c