vim-dispatch
vim-dispatch copied to clipboard
Window sometimes doesn't jump to error unless focused
When I type :Dispatch, :Dispatch make is opened in a small split. It prints the output as expected, but then jumps to the top. Only when I focus on this small split does it jump to the properly highlighted error.
Sometimes it does jump to the highlighted error without focusing. The first time I run :Dispatch in a new session, it always does this.
I'm running Vim in the Git Bash window on Windows.
What if you press <C-L> to force a redraw without focusing the window? Does that fix the positioning?
Nope, it had no effect. :redraw! didn't do anything either.
(For unrelated reasons, I switched to Vim in MSYS2 before trying, but it's exhibiting the same behavior.)
Try with a slow script and see if that illuminates when and how it fails. Something like:
for i in $(seq 1 20); do
sleep 1
echo $i
done
Not sure I understand what you want me to do. It printed the output and then jumped to the top as I would expect.

This is the correct behavior. What happens if you take out the sleep?
It blinks empty before drawing 1-10 at once (same end result as previous screenshot).
I guess I don't understand what you mean by "doesn't jump to error". What are your definitions of "error" and "jump to"?
Sorry, maybe I should have started with a screenshot.
When I run my tests (:Dispatch), I would like the error to be highlighted and scrolled down to in the quickfix window (not the code itself). This happens the first time:

On subsequent runs, however, it scrolls to the top instead:

Only when I focus on the quickfix window, it scrolls down to the highlighted error (identical to the first screenshot).
So, "error" is whatever Vim/Make determines is an error and "jump to" means scrolling down to and showing a line.
Does closing the window with :cclose before running have any effect?
No, it still did the second thing.