Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update phpcomplete.vim (fixes an issue with window focus)

  • Loading branch information...
commit 01836287cc90a3d68b6b1c2ea29e14dd059005dd 1 parent 2129ebb
@hlissner hlissner authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 autoload/phpcomplete.vim
View
8 autoload/phpcomplete.vim
@@ -731,6 +731,10 @@ function! phpcomplete#GetClassContents(file, name) " {{{
" this is the most efficient way. The other way
" is to go through the looong string looking for
" matching {}
+
+ " remember the window we started at
+ let phpcomplete_original_window = winnr()
+
below 1new
0put =cfile
call search('class\s\+'.a:name)
@@ -749,6 +753,10 @@ function! phpcomplete#GetClassContents(file, name) " {{{
let classcontent = cfile
bw! %
+
+ " go back to original window
+ exe phpcomplete_original_window.'wincmd w'
+
if extends_class != ''
let classlocation = phpcomplete#GetClassLocation(extends_class)
if filereadable(classlocation)
Please sign in to comment.
Something went wrong with that request. Please try again.