File plugin/qthelp.vim changed (mode: 100644) (index 541cd67..bf75a4c) |
... |
... |
endfunction |
115 |
115 |
function! s:QHGetTagsListUC() |
function! s:QHGetTagsListUC() |
116 |
116 |
" wuc is for Word Underneath the Cursor |
" wuc is for Word Underneath the Cursor |
117 |
117 |
let l:wuc = expand('<cword>') |
let l:wuc = expand('<cword>') |
|
118 |
|
|
118 |
119 |
let l:lst = taglist('//apple_ref/cpp/cl//'.l:wuc.'$') |
let l:lst = taglist('//apple_ref/cpp/cl//'.l:wuc.'$') |
|
120 |
|
if empty(l:lst) |
|
121 |
|
let l:lst = taglist('^'.l:wuc.'$') |
|
122 |
|
call filter(l:lst, 'v:val["filename"] =~? "[/\]'.l:wuc.'.html$"') |
|
123 |
|
endif |
|
124 |
|
|
119 |
125 |
if empty(l:lst) " if WUC is var_name |
if empty(l:lst) " if WUC is var_name |
120 |
126 |
let [l:class, b:membername] = QHGetVUCInfo() |
let [l:class, b:membername] = QHGetVUCInfo() |
121 |
127 |
if empty(b:membername) |
if empty(b:membername) |
122 |
128 |
let l:lst = taglist('//apple_ref/cpp/cl//'.l:class.'$') |
let l:lst = taglist('//apple_ref/cpp/cl//'.l:class.'$') |
|
129 |
|
if empty(l:lst) |
|
130 |
|
let l:lst = taglist('^'.l:class.'$') |
|
131 |
|
endif |
123 |
132 |
else |
else |
124 |
133 |
let l:lst = s:QHGetTagsListOnMember(l:class, b:membername) |
let l:lst = s:QHGetTagsListOnMember(l:class, b:membername) |
125 |
134 |
if empty(l:lst) |
if empty(l:lst) |
126 |
135 |
let b:membername = '' |
let b:membername = '' |
127 |
136 |
let l:lst = taglist('//apple_ref/cpp/cl//'.l:class.'$') |
let l:lst = taglist('//apple_ref/cpp/cl//'.l:class.'$') |
128 |
137 |
endif |
endif |
|
138 |
|
if empty(l:lst) |
|
139 |
|
let b:membername = '' |
|
140 |
|
let l:lst = taglist('^'.l:class.'$') |
|
141 |
|
endif |
129 |
142 |
endif |
endif |
130 |
143 |
else |
else |
131 |
144 |
let b:membername = '' |
let b:membername = '' |
132 |
145 |
endif |
endif |
|
146 |
|
|
133 |
147 |
return l:lst |
return l:lst |
134 |
148 |
endfunction |
endfunction |
135 |
149 |
|
|
|
... |
... |
endfunction |
137 |
151 |
" modify it last |
" modify it last |
138 |
152 |
function! s:QHGetTagsListOnMember(class, member) |
function! s:QHGetTagsListOnMember(class, member) |
139 |
153 |
let l:lst = taglist('^'.a:member.'-typedef$') |
let l:lst = taglist('^'.a:member.'-typedef$') |
|
154 |
|
call filter(l:lst, 'v:val["filename"] =~? "[/\]'.a:class.'.html$"') |
140 |
155 |
if len(l:lst) != 0 |
if len(l:lst) != 0 |
141 |
156 |
let b:membername = a:member.'-typedef' |
let b:membername = a:member.'-typedef' |
142 |
157 |
return l:lst |
return l:lst |
143 |
158 |
endif |
endif |
144 |
159 |
let l:lst = taglist('^'.a:member.'-enum$') |
let l:lst = taglist('^'.a:member.'-enum$') |
|
160 |
|
call filter(l:lst, 'v:val["filename"] =~? "[/\]'.a:class.'.html$"') |
145 |
161 |
if len(l:lst) != 0 |
if len(l:lst) != 0 |
146 |
162 |
let b:membername = a:member.'-enum' |
let b:membername = a:member.'-enum' |
147 |
163 |
return l:lst |
return l:lst |
|
... |
... |
function! s:QHGetTagsListOnMember(class, member) |
159 |
175 |
if empty(l:lst) |
if empty(l:lst) |
160 |
176 |
let l:lst = taglist('//apple_ref/cpp/tag/'.a:class.'/'.a:member.'$') |
let l:lst = taglist('//apple_ref/cpp/tag/'.a:class.'/'.a:member.'$') |
161 |
177 |
endif |
endif |
|
178 |
|
if empty(l:lst) |
|
179 |
|
let l:lst = taglist('^'.a:member.'$') |
|
180 |
|
call filter(l:lst, 'v:val["filename"] =~? "[/\]'.a:class.'\.html$"') |
|
181 |
|
endif |
162 |
182 |
return l:lst |
return l:lst |
163 |
183 |
endfunction |
endfunction |
164 |
184 |
|
|