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

qflist should get populated after command exits and not upon executing :Copen #349

Closed
xz47sv opened this issue Jun 18, 2024 · 1 comment
Closed

Comments

@xz47sv
Copy link

xz47sv commented Jun 18, 2024

The qflist doesn't get updated until the quickfix window is opened (immediately for :Make, after :Copen for :Make!).

I think dispatch#complete should populate it regardless if window is about to open, because users might want to interact with the quickfix list without opening the window. Plus :h QuickFixCmdPost specifies that it should run after a command is done executing which is not the case for Make!.

Simplest fix would be to move s:cgetfile call from s:cwindow into dispatch#complete and call it unconditionally.

@tpope
Copy link
Owner

tpope commented Jul 7, 2024

That's already how it works. If you :Dispatch true, the window won't open, but the quickfix list is still populated.

Passing a bang (:Dispatch!, :Make!) does prevent opening the window and populating the list until you call :Copen. This is by design. It dates back to the days when Vim lacked proper async support. These days, it's a very niche feature. It can be used to kick off a very long running task, like a full test suite, and not have to deal with it until you're ready.

users might want to interact with the quickfix list without opening the window

In practice, trying interact with the Dispatch quickfix list without seeing it is awkward, because jumping to the first error might need a :cc (if the first line has a filename) or might need a :cnext (if the first line is informative output without a filename). For this reason, Dispatch doesn't provide a way to populate the quickfix list without also revealing it.

@tpope tpope closed this as completed Jul 7, 2024
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