tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.75k stars 139 forks source link

Check for fireplace_ns always fails #133

Closed jamesaoverton closed 10 years ago

jamesaoverton commented 10 years ago

Thanks for this amazing tool! I've never worked with Vim script before, but I think I've found a small bug and a fix.

I've got 5a86ec2c81 installed and working. I'm trying to use the fireplace_ns var to override ns detection in fireplace#ns(). I set the var like so:

:let b:fireplace_ns='foo.core'

When I insert this before line 1138 of fireplace.vim I see the result 'foo.core' that I expect:

echo getbufvar(buffer, 'fireplace_ns')

But the conditional always fails, so fireplace_ns is not returned. I tried modifying the condition like so:

if getbufvar(buffer, 'fireplace_ns') != ''

and now fireplace_ns is returned (when set) as expected.

jamesaoverton commented 10 years ago

Perfect. Thanks!