Commit: runtime(ccomplete): handle structs from tags file

0 views
Skip to first unread message

Christian Brabandt

unread,
Feb 18, 2026, 11:46:42 AM (2 days ago) Feb 18
to vim...@googlegroups.com
runtime(ccomplete): handle structs from tags file

Commit: https://github.com/vim/vim/commit/89712b9f0e8cbf6074cc5dc0465bdd62245ad9c1
Author: Christian Brabandt <c...@256bit.org>
Date: Wed Feb 18 17:37:39 2026 +0100

runtime(ccomplete): handle structs from tags file

fixes: https://github.com/vim/vim/issues/7292

Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/autoload/ccomplete.vim b/runtime/autoload/ccomplete.vim
index cb4bb2c16..51237be98 100644
--- a/runtime/autoload/ccomplete.vim
+++ b/runtime/autoload/ccomplete.vim
@@ -3,7 +3,7 @@ vim9script noclear
# Vim completion script
# Language: C
# Maintainer: The Vim Project <https://github.com/vim/vim>
-# Last Change: 2025 Jul 24
+# Last Change: 2026 Feb 18
# Rewritten in Vim9 script by github user lacygoill
# Former Maintainer: Bram Moolenaar <Br...@vim.org>

@@ -489,7 +489,7 @@ def Nextitem( # {{{1
continue
endif

- # Use the tags file to find out if this is a typedef.
+ # Use the tags file to find out if this is a typedef or struct
var diclist: list<dict<any>> = taglist('^' .. tokens[tidx] .. '$')
for tagidx: number in len(diclist)->range()

@@ -509,6 +509,13 @@ def Nextitem( # {{{1
continue
endif

+ # handle struct
+ if item['kind'] == 's'
+ res = StructMembers('struct:' .. tokens[tidx], items, all)
+ break
+ endif
+
+
# Only handle typedefs here.
if item['kind'] != 't'
continue
@@ -733,4 +740,4 @@ def SearchMembers( # {{{1
enddef
#}}}1

-# vim: noet sw=2 sts=2
+# vim: et sw=2 sts=2
Reply all
Reply to author
Forward
0 new messages