File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ let s:action = 'use'
1313" Tag kinds, to use on s:GetTagKind(...)
1414let s: kinds = {' c' : ' Class' , ' t' : ' Trait' , ' i' : ' Interface' }
1515
16+ let s: previous_win_nr = 0
17+
1618" Define commands for PHP user
1719command ! PHPImportClass call s: PHPImportClass (' use' )
1820command ! PHPExpandFQCN call s: PHPImportClass (' expand_fqcn' )
@@ -22,6 +24,7 @@ command! PHPExpandFQCNAbsolute call s:PHPImportClass('expand_fqcn_absolute')
2224" Start the import process
2325"
2426function ! s: PHPImportClass (action)
27+ let s: previous_win_nr = winnr ()
2528 let s: action = a: action
2629 let l: class = expand (' <cword>' )
2730 let s: tags = s: SearchTags (l: class )
@@ -88,6 +91,8 @@ function! s:SelectOption(index)
8891 let s: windowIsOpen = 0
8992 endif
9093
94+ execute " :" .s: previous_win_nr ." wincmd w"
95+
9196 if s: action == ' use'
9297 if s: FqcnExists (l: fqcn )
9398 call s: Message (l: kind .' "' .l: fqcn .' " already in use.' )
You can’t perform that action at this time.
0 commit comments