summaryrefslogtreecommitdiffstats
path: root/runtime/autoload
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-05-13 20:23:24 +0200
committerBram Moolenaar <Bram@vim.org>2014-05-13 20:23:24 +0200
commite968e36a00ddc735d493906f04eb207ff9aeb87c (patch)
tree280c857ada2acf51168c4484157c237ff36d89bd /runtime/autoload
parent715c28635568fbbe4963b7443dd47c2f0e624eaf (diff)
Update runtime files.
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/phpcomplete.vim10
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/autoload/phpcomplete.vim b/runtime/autoload/phpcomplete.vim
index 2ff94ced22..88c3e253a5 100644
--- a/runtime/autoload/phpcomplete.vim
+++ b/runtime/autoload/phpcomplete.vim
@@ -2,6 +2,8 @@
" Language: PHP
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
+" URL: https://github.com/shawncplus/phpcomplete.vim
+" Last Change: 2014 May 08
"
" OPTIONS:
"
@@ -16,7 +18,7 @@
" The completion list generated this way is only filtered by the completion base
" and generally not much more accurate then simple keyword completion.
"
-" let g:phpcomplete_search_tags_for_variables = 1/0 [default 0]
+" let g:phpcomplete_search_tags_for_variables = 1/0 [default 0]
" Enables use of tags when the plugin tries to find variables.
" When enabled the plugin will search for the variables in the tag files with kind 'v',
" lines like $some_var = new Foo; but these usually yield highly inaccurate results and
@@ -138,7 +140,7 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
unlet! b:compl_context
" chop of the "base" from the end of the current instruction
if a:base != ""
- let context = substitute(context, '\s*\$\?\([a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\)*$', '', '')
+ let context = substitute(context, '\s*[$a-zA-Z_0-9\x7f-\xff]*$', '', '')
end
end
@@ -1553,12 +1555,14 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
" do in-file lookup of $var = new Class
if line =~# '^\s*'.object.'\s*=\s*new\s\+'.class_name_pattern && !object_is_array
let classname_candidate = matchstr(line, object.'\c\s*=\s*new\s*\zs'.class_name_pattern.'\ze')
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
break
endif
" in-file lookup for Class::getInstance()
if line =~# '^\s*'.object.'\s*=&\?\s*'.class_name_pattern.'\s*::\s*getInstance' && !object_is_array
let classname_candidate = matchstr(line, object.'\s*=&\?\s*\zs'.class_name_pattern.'\ze\s*::\s*getInstance')
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
break
endif
@@ -1822,8 +1826,6 @@ function! phpcomplete#GetFunctionLocation(function_name, namespace) " {{{
if no_namespace_candidate != ''
return no_namespace_candidate
endif
-endif
-
endfunction
" }}}