]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1618: completion: incorrect selected index returned from complete_info() v9.1.1618
authorRobert Muir <rmuir@apache.org>
Sun, 10 Aug 2025 07:19:36 +0000 (09:19 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 10 Aug 2025 07:19:36 +0000 (09:19 +0200)
commit8e2a2291892935f28645cbe550ef2856bab1ee4e
treea6d61956625dfef2da930d3b6e58a8f72d288643
parent1434ea03b1e47ec49dfcba207e59006b32091d3b
patch 9.1.1618: completion: incorrect selected index returned from complete_info()

Problem:  completion: incorrect selected index returned from
          complete_info()
Solution: Return the index into "items" and restore the previous
          behaviour (Robert Muir).

complete_info() returned an incorrect selected index after
0ac1eb3555445f4c458c06cef7c411de1c8d1020 (Patch v9.1.1311). Effectively
it became an index into "matches" instead of "items". Return the index
into "items" by default to restore the previous behavior, unless
"matches" was requested.

closes: #17952

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Robert Muir <rmuir@apache.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/insexpand.c
src/testdir/test_ins_complete.vim
src/version.c