You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Window sometimes doesn't jump to error unless focused #284
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.
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.
Activity
tpope commentedon Aug 17, 2019
What if you press
<C-L>to force a redraw without focusing the window? Does that fix the positioning?augustjanse commentedon Aug 19, 2019
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.)
tpope commentedon Aug 19, 2019
Try with a slow script and see if that illuminates when and how it fails. Something like:
augustjanse commentedon Aug 19, 2019
Not sure I understand what you want me to do. It printed the output and then jumped to the top as I would expect.
tpope commentedon Aug 19, 2019
This is the correct behavior. What happens if you take out the sleep?
augustjanse commentedon Aug 19, 2019
It blinks empty before drawing 1-10 at once (same end result as previous screenshot).
tpope commentedon Aug 19, 2019
I guess I don't understand what you mean by "doesn't jump to error". What are your definitions of "error" and "jump to"?
augustjanse commentedon Aug 20, 2019
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.
tpope commentedon Aug 20, 2019
Does closing the window with
:cclosebefore running have any effect?augustjanse commentedon Aug 20, 2019
No, it still did the second thing.
symbolix commentedon Jul 28, 2025
I'm having a potentially similar issue:
When I run this:
:Dispatch gcc %:p -o build/%:t:r
I get the errors listed in the QF buffer,
But then none of the commands are working
:cnext,:cprevetc. I can't jump to the errors based on the error message in the QF buffer.Upon further inspection using the following command:
:echo getqflist()I can see that the QF is not constructed in the correct way, no filename or other information is present (line numbers etc.)