Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only open quickfix window on error #23

Closed
dpwright opened this issue Apr 8, 2013 · 2 comments
Closed

Only open quickfix window on error #23

dpwright opened this issue Apr 8, 2013 · 2 comments

Comments

@dpwright
Copy link

dpwright commented Apr 8, 2013

It would be nice if there were an option only to open the quickfix window if the dispatched command returns a non-zero value; otherwise leave it in the background to be opened with :Copen if necessary.

I'm using dispatch to compile C/C++ files, and since I have warnings set to errors I am rarely interested in the output unless there was an error. I could use "Make!", but it is nice to see the progress of the build as it's going on; I'd just like it to disappear at the end if there were no problems.

I can have a go at writing it myself, but I'm not sure what sort of interface you'd want since I notice there are currently no configuration parameters.

@tpope
Copy link
Owner

tpope commented Apr 8, 2013

I'm pretty averse to configuration, but let's put that aside for now. The first blocker is that we have no way to retrieve the exit status, and I'm not sure there's a portable way to rectify that.

If the quickfix window is completely empty, it won't be opened. My intent was that if you have output you seldom care about, you would use an 'errorformat' that didn't capture it at all.

@dpwright
Copy link
Author

That makes sense -- thanks. I'll investigate my errorformat and see why it's capturing all the output. In the case where there are errors it correctly captures only the errors, but if there are no errors it just captures every line of output.

This was happening before I installed vim-dispatch so it's unrelated. I'll try to fix that and see if that renders my request unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants