Allow omitting ns from fireplace#message

This commit is contained in:
Tim Pope 2014-04-12 20:09:26 -04:00
parent 79c2a718da
commit 9e826faff4

View File

@ -535,6 +535,8 @@ function! fireplace#message(payload, ...) abort
let payload = copy(a:payload) let payload = copy(a:payload)
if !has_key(payload, 'ns') if !has_key(payload, 'ns')
let payload.ns = fireplace#ns() let payload.ns = fireplace#ns()
elseif empty(payload.ns)
unlet payload.ns
endif endif
return call(client.message, [payload] + a:000, client) return call(client.message, [payload] + a:000, client)
endfunction endfunction