runtime(ccomplete): handle structs from tags file
Commit:
https://github.com/vim/vim/commit/89712b9f0e8cbf6074cc5dc0465bdd62245ad9c1
Author: Christian Brabandt <[email protected]>
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 <[email protected]>
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 <[email protected]>
@@ -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
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1vskfg-0019oH-AV%40256bit.org.