-
-
Notifications
You must be signed in to change notification settings - Fork 133
Open
Description
I'm having the following problem:
When I run this:
:Dispatch gcc %:p -o build/%:t:r
I get the errors listed in the QF buffer,
1 || /home/me/dev/vixrc-project-config/template_dispatch_typeA/src/main.c:20:5: warning: implicit declaration of function ‘my_request’ [-Wimplicit-function-declaration]¬
2 || 20 | my_request(1);¬
3 || | ^~~~~~~~~~¬
4 || /home/me/dev/vixrc-project-config/template_dispatch_typeA/src/main.c:22:36: error: expected ‘;’ before ‘sleep’¬
5 || 22 | printf("Processing data ...\n")¬
6 || | ^¬
7 || | ;¬
8 || 23 | sleep(5);¬
But then none of the commands are working :cnext, :cprev etc. 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.)
[{'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'module': '', 'type': 'I', 'end_col': 0, 'col': 0, 'text': '/home/me/dev/vixrc-project-config/template_dispatch_typeA/src/main.c: In function ‘main’:'}, {'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'module': '', 'type': 'I', 'end_col': 0, 'col': 0, 'text': '/home/me/dev/vixrc-project-config/template_dispatch_typeA/src/main.c:20:5: warning: implicit declaration of function ‘my_request’ [-Wimplicit-function-declaration]'}, {'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'module': '', 'type': 'I', 'end_col': 0, 'col': 0, 'text': ' 20
| my_request(1);'}, {'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'module': '', 'type': 'I', 'end_col': 0, 'col': 0, 'text': ' | ^~~~~~~~~~'}, {'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'module': '', 'type': 'I', 'end_col': 0, 'col': 0, 'text': '/home/me/dev/vixrc-project-config/template_dispatch_typeA/src/main.c:22:36: error: expected ‘;’ before ‘sleep’'}, {'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'module': '', 'type': 'I', 'end_col': 0, 'col': 0, 'text': ' 22 | printf("Processing data ...\n")'}, {'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'module': '', 'type': 'I', 'end_col': 0, 'col': 0, 'text': ' | ^'}, {'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'module': '', 'type': 'I', 'end_col': 0, 'col': 0, 'text': ' | ;'}, {'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'module': '', 'type': 'I', 'end_col': 0, 'col': 0, 'text': ' 23 | sleep(5);'}, {'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'module': '', 'type': 'I', 'end_col': 0, 'col': 0, 'text': ' | ~~~~~ '}]
Seems like :cnext and :cprev jump to next and previous lines within the Qf buffer, but not setting the cursor in the source file buffer.
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jul 21 2025 01:39:54) Included patches: 1-1573
OS: Linux Mint 22.1 x86_64
Running in the terminal (Alacritty), no tmux
Metadata
Metadata
Assignees
Labels
No labels