summaryrefslogtreecommitdiff
path: root/runtime/autoload/phpcomplete.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/autoload/phpcomplete.vim')
-rw-r--r--runtime/autoload/phpcomplete.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/autoload/phpcomplete.vim b/runtime/autoload/phpcomplete.vim
index e5d910e3..07565558 100644
--- a/runtime/autoload/phpcomplete.vim
+++ b/runtime/autoload/phpcomplete.vim
@@ -1,7 +1,7 @@
" Vim completion script
" Language: PHP
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
-" Last Change: 2006 May 9
+" Last Change: 2011 Dec 08
"
" TODO:
" - Class aware completion:
@@ -650,6 +650,7 @@ function! phpcomplete#GetClassContents(file, name) " {{{
" this is the most efficient way. The other way
" is to go through the looong string looking for
" matching {}
+ let original_window = winnr()
below 1new
0put =cfile
call search('class\s\+'.a:name)
@@ -667,6 +668,9 @@ function! phpcomplete#GetClassContents(file, name) " {{{
let classcontent = join(classc, "\n")
bw! %
+ " go back to where we started
+ exe original_window.'wincmd w'
+
if extends_class != ''
let classlocation = phpcomplete#GetClassLocation(extends_class)
if filereadable(classlocation)