]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0508: completion: cannot complete user cmd :K with 'ignorecase' v9.2.0508
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Thu, 21 May 2026 19:57:06 +0000 (19:57 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 21 May 2026 19:57:06 +0000 (19:57 +0000)
commitb54e57ee54f0a4e6eac74b071071a9d85326de3a
treed27078dfbf05ae47f63b990ba77d12f867bf6066
parent6845c7a63d573682b82d03d4ad606d27547f9498
patch 9.2.0508: completion: cannot complete user cmd :K with 'ignorecase'

Problem:  completion: cannot complete user cmd :K with 'ignorecase'
          (rendcrx)
Solution: Skip the short-circuit when 'ignorecase' is set
          (Yasuhiro Matsumoto)

The set_cmd_index() short-circuit for the :k command treats ":k<X>" as
":k {X}" (mark argument), which makes ":kz<Tab>" never reach the
command-name expansion path. With 'ignorecase' the same prefix on other
letters (":gz<Tab>") completes a user command like :Gz, so the result is
inconsistent. Skip the short-circuit when 'ignorecase' is set; default
behaviour is preserved so the existing :k tests still pass.

fixes:  #20241
closes: #20275

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/cmdexpand.c
src/testdir/test_cmdline.vim
src/version.c