Closed mudge closed 12 years ago
Should've known. I noticed the inconsistency myself today as I wrote some docstrings here and there. I thought I'd checked it and it worked either way, but, well, apparently I hadn't.
I've added the check for clientserver support in the instance, as opposed to doing it in the path method. That way, the @gui
attribute can be set appropriately. Since I've managed to replicate the bug on linux by changing clientserver_enabled?
, I assume I was able to fix it, but could you confirm?
Unfortunately not due to list
requiring clientserver
, see https://github.com/AndrewRadev/vimrunner/commit/d96a95ec8847a2bd5c1f61533a447a7579838548#commitcomment-1240723 for more details.
I've pushed a possible fix for the serverlist issue. As suggested, I simply moved it to the instance for now. I definitely need to re-think the whole thing, though. I compiled a "tiny" version of vim to test with and it seems to be alright with :vim_path => 'tinyvim'
, but I should probably look for some more edge cases, like a missing gvim
for example. Not that anything interesting can be done there, but a better error message would be appropriate at least.
I can confirm that fixes the issue here.
As for the refactor: I think it might be a good idea to centralise the logic in a separate Vim
class as you mentioned in your comment as something that both the Server
and Client
use to invoke commands.
Alright, I'll release a quick fix for now and work on the refactoring in the coming days.
By the way, how do you feel about becoming a contributor to the project? I don't have a mac and there might be some issues there yet. Stubbing and mocking can only get me so far with testing features on the different platforms. Plus, if you're using it for your own vim plugins, you'll probably find improvements/fixes to the client interface, like you did with your other pull requests.
In any case, thanks for looking out for me :). I'll try to figure out a better way to test with different Vims and other conditions.
Sure, I'd be happy to come on-board as a contributor to help test the Mac side of things more.
One quick edge-case (that just bit me): if
Vimrunner.start_vim
starts a GUI vim (as it will on a Mac without symlinkingvim
tomvim
), the@gui
flag will not be set in theServer
instance and so the process will not fork correctly (it will usePTY.spawn
instead ofKernel.spawn
).I guess the reason this slipped through the cracks is that
clientserver_enabled?
is stubbed totrue
in theServer
specs: if you haveclientserver_enabled?("vim")
return false then it should fallback togvim
ormvim
which is when the@gui
problem hits.