Skip to content

Commit

Permalink
fix restore global var
Browse files Browse the repository at this point in the history
  • Loading branch information
justmao945 committed Feb 16, 2015
1 parent 2be2d92 commit 323a9c0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions plugin/clang.vim
Original file line number Diff line number Diff line change
Expand Up @@ -892,9 +892,14 @@ endf
" 'diagnostics': [], // diagnostics info
" }
func! ClangComplete(findstart, base)
call s:PDebug("ClangComplete", "start")

let l:gvars = s:GlobalVarSet()
let l:res = s:ClangComplete(a:findstart, a:base)
call s:GlobalVarRestore(l:gvars)
return l:res
endf

func! s:ClangComplete(findstart, base)
call s:PDebug("ClangComplete", "start")

if a:findstart
call s:PDebug("ClangComplete", "phase 1")
Expand Down Expand Up @@ -977,8 +982,6 @@ func! ClangComplete(findstart, base)
return []
endif
endif

call s:GlobalVarRestore(l:gvars)
endf
"}}}

Expand Down

0 comments on commit 323a9c0

Please sign in to comment.