summaryrefslogtreecommitdiffstats
path: root/runtime/autoload/ccomplete.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-05-03 21:28:47 +0000
committerBram Moolenaar <Bram@vim.org>2006-05-03 21:28:47 +0000
commit8b2d9c4318eb24275d69bdf8b66680b544c1908d (patch)
tree1f07c7ad71eb34c5b8fc215a9218c75b38938a3d /runtime/autoload/ccomplete.vim
parent9c102387aff079b513533e93bb2a8109ccc1492c (diff)
updated for version 7.0g02
Diffstat (limited to 'runtime/autoload/ccomplete.vim')
-rw-r--r--runtime/autoload/ccomplete.vim8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/autoload/ccomplete.vim b/runtime/autoload/ccomplete.vim
index 2d5e0ee1e7..5296038e0f 100644
--- a/runtime/autoload/ccomplete.vim
+++ b/runtime/autoload/ccomplete.vim
@@ -1,7 +1,7 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2006 Mar 24
+" Last Change: 2006 May 03
" This function is used for the 'omnifunc' option.
@@ -379,7 +379,9 @@ function! s:Nextitem(lead, items, depth, all)
endif
" Recognize "struct foobar" and "union foobar".
- if (tokens[tidx] == 'struct' || tokens[tidx] == 'union') && tidx + 1 < len(tokens)
+ " Also do "class foobar" when it's C++ after all (doesn't work very well
+ " though).
+ if (tokens[tidx] == 'struct' || tokens[tidx] == 'union' || tokens[tidx] == 'class') && tidx + 1 < len(tokens)
let res = s:StructMembers(tokens[tidx] . ':' . tokens[tidx + 1], a:items, a:all)
break
endif
@@ -421,7 +423,7 @@ function! s:Nextitem(lead, items, depth, all)
if ei > 1
let cmdtokens = split(strpart(cmd, ei), '\s\+\|\<')
if len(cmdtokens) > 1
- if cmdtokens[0] == 'struct' || cmdtokens[0] == 'union'
+ if cmdtokens[0] == 'struct' || cmdtokens[0] == 'union' || cmdtokens[0] == 'class'
let name = ''
" Use the first identifier after the "struct" or "union"
for ti in range(len(cmdtokens) - 1)