Refactor global variables into script local variables.

These variables only occur in one file each.  By making them script local
variables this is "documented" in the code.  At the same time the global
namespace is polluted less.

Changed:
    g:bundle_names          -> s:bundle_names
    g:vundle_last_status    -> s:last_status
    g:vundle_log_file       -> s:log_file
    g:vundle_view           -> s:view
This commit is contained in:
Lucas Hoffmann
2015-03-03 10:50:28 +01:00
parent cad5f50a64
commit 088295df77
3 changed files with 14 additions and 14 deletions

View File

@@ -55,11 +55,11 @@ func! s:process(bang, cmd)
exec ':norm '.a:cmd
if 'error' == g:vundle_last_status
if 'error' == s:last_status
let msg = 'With errors; press l to view log'
endif
if 'updated' == g:vundle_last_status && empty(msg)
if 'updated' == s:last_status && empty(msg)
let msg = 'Plugins updated; press u to view changelog'
endif
@@ -118,7 +118,7 @@ func! vundle#installer#run(func_name, name, ...) abort
throw 'whoops, unknown status:'.status
endif
let g:vundle_last_status = status
let s:last_status = status
return status
endf