Default to user namespace

Closes #9.
This commit is contained in:
Tim Pope 2012-12-06 20:44:00 -05:00
parent 8ce5fbd119
commit bc9d873fff

View File

@ -354,7 +354,7 @@ endfunction
function! foreplay#eval(expr, ...) abort function! foreplay#eval(expr, ...) abort
let c = s:client() let c = s:client()
if !a:0 if !a:0 && foreplay#ns() !~# '^\%(user\)$'
call c.require(foreplay#ns()) call c.require(foreplay#ns())
endif endif
return c.eval(a:expr, a:0 ? a:1 : foreplay#ns()) return c.eval(a:expr, a:0 ? a:1 : foreplay#ns())
@ -770,7 +770,8 @@ function! s:tons(path) abort
endfunction endfunction
function! foreplay#ns() abort function! foreplay#ns() abort
return s:tons(s:buffer_path()) let path = s:buffer_path()
return s:tons(path ==# '' ? 'user' : path)
endfunction endfunction
function! s:Lookup(macro, arg) abort function! s:Lookup(macro, arg) abort