[vim/vim] Option to set quickfix item limit (Issue #10266)

66 views
Skip to first unread message

Sharlock93

unread,
Apr 23, 2022, 10:26:05 PM4/23/22
to vim/vim, Subscribed

As mentioned in issue #4780 items in the quickfix window are limited to 1023 bytes.
I was wondering if its possible to add an option to set this limit in .vimrc?
looking at the source code it seems IObuff is allocated very early on so maybe its not possible to do this via .vimrc but maybe from the command line?
I changed IOSIZE manually and recompiled, seems to work well enough.

For context: I use a plugin (asyncrun) to run files which captures the stdout and puts them into quickfix.
And vulkan validation messages (some of them) go over the 1024 byte limit which gets truncated in the quickfix window.
I was bitten by this because I didn't know the validation messages could be that long.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10266@github.com>

Bram Moolenaar

unread,
Apr 24, 2022, 6:51:59 AM4/24/22
to vim/vim, Subscribed


> As mentioned in issue #4780 items in the `quickfix` window are limited to 1023 bytes.
> I was wondering if its possible to add an option to set this limit in `.vimrc`?

> looking at the source code it seems `IObuff` is allocated very early on so maybe its not possible to do this via `.vimrc` but maybe from the command line?
> I changed `IOSIZE` manually and recompiled, seems to work well enough.
>
> For context: I use a plugin (asyncrun) to run files which captures the `stdout` and puts them into quickfix.
> And vulkan validation messages (some of them) go over the 1024 byte limit which gets truncated in the quickfix window.
> I was bitten by this because I didn't know the validation messages could be that long.

There already is support in some places for handling long lines.
For the quickfix window the idea was that there is not so much need for
displaying very long lines. But there might be cases where relevant
info is at the end and gets dropped. Is that what happens for you?

It would just be a matter of allocating a bigger buffer, which isn't
really much of a problem these days.


--
Don't read everything you believe.

/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10266/1107815442@github.com>

Sharlock93

unread,
Apr 24, 2022, 8:41:52 AM4/24/22
to vim/vim, Subscribed

But there might be cases where relevant info is at the end and gets dropped. Is that what happens for you?

Indeed that is the case here is a screenshot:
Quickfix Menu Cutoff

It would just be a matter of allocating a bigger buffer, which isn't really much of a problem these days.

I would assume even if you increase the IOSIZE to something much larger due to it being static it might still be a problem,

looking at the source code again I don't quite understand why qf_get_next_file_line grows the buffer until it reaches LINE_MAXLEN but then goes on to discard all the read data? this is just a quick glance so I might be missing something.
Ideally I think having an option to set LINE_MAXLEN or IOSIZE would be the best option but I don't know enough about the code to see the ramifications


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10266/1107833667@github.com>

Bram Moolenaar

unread,
Oct 11, 2022, 5:27:08 AM10/11/22
to vim/vim, Subscribed


> > But there might be cases where relevant info is at the end and gets dropped. Is that what happens for you?
>
> Indeed that is the case here is a screenshot:
> ![Quickfix Menu Cutoff](https://i.imgur.com/M8U3QCl.png)

>
> > It would just be a matter of allocating a bigger buffer, which isn't
> > really much of a problem these days.
> I would assume even if you increase the `IOSIZE` to something much
> larger due to it being static it might still be a problem,

Increasing IOSIZE is not a good way, it is used in many places and you
would need to check all of them to make sure there won't be a problem.


> looking at the source code again I don't quite understand why
> `qf_get_next_file_line` grows the buffer until it reaches
> `LINE_MAXLEN` but then goes on to discard all the read data? this is
> just a quick glance so I might be missing something.
> Ideally I think having an option to set `LINE_MAXLEN` or `IOSIZE`
> would be the best option but I don't know enough about the code to see
> the ramifications

Only the part where the quickfix window is filled needs to be changed.

LINE_MAXLEN is more a safety against reading a bogus error file. E.g.
when accidentally using a binary file.

--
hundred-and-one symptoms of being an internet addict:
42. Your virtual girlfriend finds a new net sweetheart with a larger bandwidth.


/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10266/1274396129@github.com>

Sharo

unread,
Oct 12, 2022, 3:18:31 AM10/12/22
to vim/vim, Subscribed

Increasing IOSIZE is not a good way, it is used in many places and you would need to check all of them to make sure there won't be a problem.

Yeah this is what I was worried about, updating IOSIZE directly while it worked for me as a test it wouldn't be safe to just change that and even if it was safe what size would you pick?

Unfortunately due to starting a new job I cannot dedicate enough time to this. It would be amazing to have it implemented in someway even if its at the compilation level.
At this point you can leave the issue open if there is a chance of it being implement it or you can close it. Thank you.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10266/1275701725@github.com>

Bram Moolenaar

unread,
Oct 12, 2022, 9:23:50 AM10/12/22
to vim/vim, Subscribed

Maybe @yegappan can look into this, he has done work on quickfix before.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10266/1276168764@github.com>

Yegappan Lakshmanan

unread,
Oct 12, 2022, 9:35:51 PM10/12/22
to vim/vim, Subscribed

I have created PR #11357 to address this issue.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10266/1276915213@github.com>

Bram Moolenaar

unread,
Oct 13, 2022, 9:56:27 AM10/13/22
to vim/vim, Subscribed

Thanks for the quick reply. I have included the PR, therefore closing.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10266/1277655442@github.com>

Bram Moolenaar

unread,
Oct 13, 2022, 9:56:34 AM10/13/22
to vim/vim, Subscribed

Closed #10266 as completed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/10266/issue_event/7581629802@github.com>

Reply all
Reply to author
Forward
0 new messages