bosu / hscope

Other
22 stars 6 forks source link

freeze in vim #7

Open felixSchl opened 10 years ago

felixSchl commented 10 years ago

Hi,

Not sure if this the place to ask since this tool is editor agnostic at heart, but since the readme mentions vim in particular and there are not dedicated projects out there, it might be worth a shot.

Essentially I am trying to get it to work with vim. I do set cscopeprg=hscope and then do cscope add hscope.out. Then, when I do e.g. cscope find s App, the complete terminal just hangs up. I still get a blinking cursor where the command is that I entered, but neither vim nor the terminal respond. I cannot even Ctrl-C out of it etc.

I wonder what might be going on here? Am I using it correctly? I am on Ubuntu. Using hscope from the command line works fine.

felixSchl commented 10 years ago

I see, :cscope find 3 App will work. The "3" is derived from the command line arguments to hscope. Would be good if it didn't freeze anyway - or if it printed an error message or something

mkasa commented 8 years ago

FYI, I got the same problem and created a patch (apologies for the squashed patch that includes other changes as well).

The users of cscope usually defines shortcuts for cscope, which meant that if I accidentally hit a few key strokes that invoke a function not supported by hscope, a command not supported by hscope is sent to hscope and it outputs nothing, which caused freeze in vim, waiting for an answer to come. With my patch, it calls outputLines [] when a not-supported call comes so vim won't freeze.