[vim/vim] quickfix list is limited to 1024 characters per line (#4780)

21 views
Skip to first unread message

Zealot

unread,
Aug 6, 2019, 9:20:02 AM8/6/19
to vim/vim, Subscribed

Any line longer than 1024 characters will be truncated to 1024.

If it is not considered as a bug, please document it.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

Yegappan Lakshmanan

unread,
Aug 6, 2019, 9:50:24 AM8/6/19
to vim_dev, reply+ACY5DGCFO7JSHW4TYI...@reply.github.com, vim/vim, Subscribed
Hi,

On Tue, Aug 6, 2019 at 6:20 AM Zealot <vim-dev...@256bit.org> wrote:
>
> Any line longer than 1024 characters will be truncated to 1024.
>
> If it is not considered as a bug, please document it.
>

This is not a bug and the line limit can be mentioned in the quickfix help.

Regards,
Yegappan

vim-dev ML

unread,
Aug 6, 2019, 9:50:48 AM8/6/19
to vim/vim, vim-dev ML, Your activity
Hi,

On Tue, Aug 6, 2019 at 6:20 AM Zealot <vim-dev...@256bit.org> wrote:
>
> Any line longer than 1024 characters will be truncated to 1024.
>
> If it is not considered as a bug, please document it.
>

This is not a bug and the line limit can be mentioned in the quickfix help.

Regards,
Yegappan

Bram Moolenaar

unread,
Aug 6, 2019, 11:37:09 AM8/6/19
to vim/vim, vim-dev ML, Comment

> Any line longer than 1024 characters will be truncated to 1024.
>
> If it is not considered as a bug, please document it.

Where do you get this number from?

The code appears to have a line length limit of 4096 bytes.
But strings in items are limited to 1024 bytes.


--
How To Keep A Healthy Level Of Insanity:
14. Put mosquito netting around your work area. Play a tape of jungle
sounds all day.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


You are receiving this because you commented.

Yegappan Lakshmanan

unread,
Aug 6, 2019, 12:35:31 PM8/6/19
to vim_dev, reply+ACY5DGBCPP2WW4YCBX...@reply.github.com, vim/vim, vim-dev ML, Comment
Hi Bram,

On Tue, Aug 6, 2019 at 8:37 AM Bram Moolenaar <vim-dev...@256bit.org> wrote:
>
>
> > Any line longer than 1024 characters will be truncated to 1024.
> >
> > If it is not considered as a bug, please document it.
>
> Where do you get this number from?
>

The qf_get_next_file_line() function uses the IObuff buffer with size IOSIZE
to read a line from a file. As IOSIZE is 1024, this function will truncate
the line if it has more than 1024 characters.

Regards,
Yegappan

vim-dev ML

unread,
Aug 6, 2019, 12:35:57 PM8/6/19
to vim/vim, vim-dev ML, Your activity
Hi Bram,

On Tue, Aug 6, 2019 at 8:37 AM Bram Moolenaar <vim-dev...@256bit.org> wrote:
>
>
> > Any line longer than 1024 characters will be truncated to 1024.
> >
> > If it is not considered as a bug, please document it.
>
> Where do you get this number from?
>

The qf_get_next_file_line() function uses the IObuff buffer with size IOSIZE
to read a line from a file. As IOSIZE is 1024, this function will truncate
the line if it has more than 1024 characters.

Regards,
Yegappan

>
> The code appears to have a line length limit of 4096 bytes.
> But strings in items are limited to 1024 bytes.
>

Bram Moolenaar

unread,
Aug 6, 2019, 2:48:20 PM8/6/19
to vim/vim, vim-dev ML, Comment


> On Tue, Aug 6, 2019 at 8:37 AM Bram Moolenaar <vim-dev...@256bit.org> wrote:
> >
> >
> > > Any line longer than 1024 characters will be truncated to 1024.
> > >
> > > If it is not considered as a bug, please document it.
> >
> > Where do you get this number from?
> >
>
> The qf_get_next_file_line() function uses the IObuff buffer with size IOSIZE
> to read a line from a file. As IOSIZE is 1024, this function will truncate
> the line if it has more than 1024 characters.

But then this follows:

// The current line exceeds IObuff, continue reading using
// growbuf until EOL or LINE_MAXLEN bytes is read.

Actually looks complicated, we could just allocate a buffer of size
LINE_MAXLEN, since it's just 4Kbyte.

--
Now it is such a bizarrely improbable coincidence that anything as
mind-bogglingly useful as the Babel fish could have evolved purely by chance
that some thinkers have chosen to see it as a final and clinching proof of the
NON-existence of God.
The argument goes something like this: 'I refuse to prove that I exist,' says
God, 'for proof denies faith, and without faith I am nothing.'
'But,' says Man, 'the Babel fish is a dead giveaway, isn't it? It could not
have evolved by chance. It proves you exist, and so therefore, by your own
arguments, you don't. QED.'
'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a
puff of logic.
'Oh, that was easy,' says Man, and for an encore goes on to prove that black
is white and gets himself killed on the next pedestrian crossing.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"


/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


You are receiving this because you commented.

Christian Brabandt

unread,
Aug 16, 2019, 2:49:03 AM8/16/19
to vim/vim, vim-dev ML, Comment

documented as of 088e8e3, so closing.


You are receiving this because you commented.

Christian Brabandt

unread,
Aug 16, 2019, 2:49:04 AM8/16/19
to vim/vim, vim-dev ML, Comment

Closed #4780.


You are receiving this because you commented.

Reply all
Reply to author
Forward
0 new messages