[vim/vim] qf showed messed result if added a invalid item (#7271)

24 views
Skip to first unread message

Shane-XB-Qian

unread,
Nov 7, 2020, 4:53:38 AM11/7/20
to vim/vim, Subscribed

Describe the bug
qf showed messed result if added a invalid item, pls try to reproduce !
// perhaps a bit boring to reproduce/say such 'steps' again and again, me too :( but had no choice, had to doc bugs... :(
// pls try to reproduce, and sorry if had any wording issue in advance..

To Reproduce
1, echo -e "aa\nbb\ncc" >x
2, vi --clean x -c "vimgrep /bb/ % | copen | redraw | clast | call setqflist([' <-- abc'], 'a')"

Expected behavior
pls check 'screenshot' below, normally and compatible result should be showing:

  1. 'bb' at 1st item.
    2, ' <-- abc' as invalid item at 2ed item.
    but now had 2 'bb' items showed, and/but actually there is only 1 'bb' item in getqflist(), even no that 'invalid' <-- abc item.

Screenshots
image

Environment (please complete the following information):

  • VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Nov 7 2020 12:24:04) Included patches: 1-1964
  • OS: Ubuntu 18.04
  • Terminal: xfce-term xterm(330)

Additional context
looked into about 60 plugins, looks it impacted lots of plugins behaviour, or unless if i missunderstood/confused something..


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

Bram Moolenaar

unread,
Nov 7, 2020, 7:51:45 AM11/7/20
to vim/vim, Subscribed

I think what you mean is that this part of the help is not applied: "Non-dictionary items in {list} are ignored.".
You pass a string but it's not ignored.

Bram Moolenaar

unread,
Nov 7, 2020, 7:52:58 AM11/7/20
to vim/vim, Subscribed

Oh, and this is about quickfix, not the "qf" command (which doesn't exist, I read it as "gf").

Shane-XB-Qian

unread,
Nov 7, 2020, 8:03:09 AM11/7/20
to vim/vim, Subscribed

yes. 'qf' generally shorten for 'quickfix'. :)

// as compatible, getqflist() should return 'invalid' items also by default.
// and show qf items correctly, even it was an 'invalid' item.
otherwise lots plugins depends on getqflist() to judge qf items would be wrong, and qf items would Not be showed / matched 'getqflist()' reality, and cannot added 'invalid' items (sometime it is intended to do so) into qf.

spent 2 days to look into about 60 plugins, looks it is impacted a lot to plugins' right behaviours ..........

Shane-XB-Qian

unread,
Nov 7, 2020, 8:08:04 AM11/7/20
to vim/vim, Subscribed

and some native vim cmd e.g 'cgete' etc were wrong, also.. if so...

Shane-XB-Qian

unread,
Nov 13, 2020, 1:17:55 PM11/13/20
to vim/vim, vim-dev ML, Mention

@vim-ml @brammool we're working on this, right? or whatever pls queue it per your priority.


You are receiving this because you were mentioned.

Bram Moolenaar

unread,
Nov 13, 2020, 4:13:28 PM11/13/20
to vim...@googlegroups.com, Shane-XB-Qian

> @vim-ml @brammool we're working on this, right? or whatever pls queue
> it per your priority.

Yegappan has been doing quite a bit of work on the quickfix stuff, I'm
hoping he will have a chance to look into this.


--
"After a few years of marriage a man can look right at a woman
without seeing her and a woman can see right through a man
without looking at him."
- Helen Rowland

/// 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 ///

Yegappan Lakshmanan

unread,
Nov 13, 2020, 8:53:02 PM11/13/20
to vim/vim, vim-dev ML, Mention

I have opened PR #7291 to fix this issue.


You are receiving this because you were mentioned.

Shane-XB-Qian

unread,
Nov 14, 2020, 1:01:49 AM11/14/20
to vim/vim, vim-dev ML, Mention

@yegappan thx. i tried that pr, looks showed 2 'bb' items issue had been fixed. however, i found a weird issue still:
image
// however i cannot solid reproduce it specially when/if '--clean', i just tried to cadde some invalid items into a existed qf.
// but you saw the items showed is not same like getqflist() get, specially those cadde items merged into that existed item..
// why? not sure if you had chance to know/find-out if there was any possibility to make such case happened..


You are receiving this because you were mentioned.

Bram Moolenaar

unread,
Nov 14, 2020, 7:15:58 AM11/14/20
to vim/vim, vim-dev ML, Mention

Closed #7271 via 2ce7790.


You are receiving this because you were mentioned.

bfrg

unread,
Nov 14, 2020, 7:35:21 AM11/14/20
to vim/vim, vim-dev ML, Mention

This seems to be related to #5735.


You are receiving this because you were mentioned.

Yegappan Lakshmanan

unread,
Nov 14, 2020, 9:24:02 AM11/14/20
to vim_dev, reply+ACY5DGHVKTLNXQOXEF...@reply.github.com, vim/vim, vim-dev ML, Mention
Hi,

On Fri, Nov 13, 2020 at 10:01 PM Shane-XB-Qian <vim-dev...@256bit.org> wrote:

@yegappan thx. i tried that pr, looks showed 2 'bb' items issue had been fixed. however, i found a weird issue still:
image
// however i cannot solid reproduce it specially when/if '--clean', i just tried to cadde some invalid items into a existed qf.
// but you saw the items showed is not same like getqflist() get, specially those cadde items merged into that existed item..
// why? not sure if you had chance to know/find-out if there was any possibility to make such case happened..



I tried to reproduce this problem by using the ':caddexpr "make\n<-- abc\n<-- def"' command.
I couldn't reproduce this problem. Are you using any plugins that modify the quickfix list?
I assume, if you close and reopen the quickfix window, then the correct entries are
displayed in the quickfix buffer?

- Yegappan
 

vim-dev ML

unread,
Nov 14, 2020, 9:24:20 AM11/14/20
to vim/vim, vim-dev ML, Your activity

Hi,

On Fri, Nov 13, 2020 at 10:01 PM Shane-XB-Qian <vim-dev...@256bit.org>
wrote:

> @yegappan <https://github.com/yegappan> thx. i tried that pr, looks

> showed 2 'bb' items issue had been fixed. however, i found a weird issue
> still:
> [image: image]
> <https://user-images.githubusercontent.com/13550529/99140989-55612a80-2681-11eb-836f-1692f3c1ff2d.png>

> // however i cannot solid reproduce it specially when/if '--clean', i just
> tried to cadde some invalid items into a existed qf.
> // but you saw the items showed is not same like getqflist() get,
> specially those cadde items merged into that existed item..
> // why? not sure if you had chance to know/find-out if there was any
> possibility to make such case happened..
>
>
>
I tried to reproduce this problem by using the ':caddexpr "make\n<--
abc\n<-- def"' command.
I couldn't reproduce this problem. Are you using any plugins that modify
the quickfix list?
I assume, if you close and reopen the quickfix window, then the correct
entries are
displayed in the quickfix buffer?

- Yegappan

Shane-XB-Qian

unread,
Nov 14, 2020, 12:27:09 PM11/14/20
to vim/vim, vim-dev ML, Mention

@bfrg not sure that ticket detail, but seems this fix should be helpful to it.
// this fix/ticket i guess would stop many qf related weird issues, help them stop struggling with it.. :)

@yegappan @vim-ml pls ignore what i said second/another weird issue, it should be influenced by efm from somewhere, though so far i am not sure where it is..
// anyway, this qf showed messed result issue had been fixed, thx buddy and @brammool . 👍


You are receiving this because you were mentioned.

Reply all
Reply to author
Forward
0 new messages