Allow forcing default ns
This commit is contained in:
parent
97758acc16
commit
8f7a07cffd
@ -156,7 +156,7 @@ function! s:nrepl_eval(expr, ...) dict abort
|
||||
throw 'Clojure: Interrupt'
|
||||
endif
|
||||
endtry
|
||||
if has_key(response, 'ns') && !has_key(options, 'ns')
|
||||
if has_key(response, 'ns') && empty(get(options, 'ns'))
|
||||
let self.ns = response.ns
|
||||
endif
|
||||
|
||||
@ -198,6 +198,9 @@ function! s:nrepl_prepare(msg) dict abort
|
||||
if !has_key(msg, 'id')
|
||||
let msg.id = fireplace#nrepl#next_id()
|
||||
endif
|
||||
if empty(get(msg, 'ns', 1))
|
||||
unlet msg.ns
|
||||
endif
|
||||
if empty(get(msg, 'session', 1))
|
||||
unlet msg.session
|
||||
elseif !has_key(msg, 'session')
|
||||
|
Loading…
Reference in New Issue
Block a user