]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1150: :hi completion may complete to wrong value v9.1.1150
authorYee Cheng Chin <ychin.git@gmail.com>
Tue, 25 Feb 2025 19:41:52 +0000 (20:41 +0100)
committerChristian Brabandt <cb@256bit.org>
Tue, 25 Feb 2025 19:41:52 +0000 (20:41 +0100)
commit9b41e8f7666be155eb9d39baa8e8de184a87eb67
tree1578166f20a73fd39442b4fed0e0f613f970103f
parentaa8345a968915d53125807b71d050a120ab85418
patch 9.1.1150: :hi completion may complete to wrong value

Problem:  :highlight auto-complettion has a minor bug where an existing
          highlight group with a cterm color being unset would result in
          it being auto-completed to -1 in cmdline which is invalid.

Solution: Correctly check for whether an int value is set to non-zero
          before retrieving the existing value for auto-complete. Also
          do this for attr/string values as they previously worked only
          by accident (Yee Cheng Chin).

closes: #16726

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/highlight.c
src/testdir/test_cmdline.vim
src/version.c