[vim/vim] Unlist the quickfix buffer when quickfix window is closed (#4113)

44 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Mar 15, 2019, 12:25:19 AM3/15/19
to vim/vim, Subscribed

After 8.1.0877, the quickfix/location list buffer is hidden when the quickfix/location list window is closed. These buffers show up in the ":ls" output cluttering the output. This patch unlists the quickfix buffer when the quickfix/location window is closed. Some updates to the help is also included.
This patch also adds support for getting the quickfix/location list buffer number using getqflist().


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/4113

Commit Summary

  • Add support for getting the quickfix buffer number using getqflist()
  • Unlist the quickfix buffer when the quickfix window is closed. Update the help text

File Changes

Patch Links:


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

Codecov

unread,
Mar 15, 2019, 12:45:26 AM3/15/19
to vim/vim, Subscribed

Codecov Report

Merging #4113 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@

##           master    #4113      +/-   ##

==========================================

- Coverage   79.25%   79.21%   -0.04%     

==========================================

  Files         105      105              

  Lines      141173   141184      +11     

==========================================

- Hits       111883   111837      -46     

- Misses      29290    29347      +57
Impacted Files Coverage Δ
src/quickfix.c 93.4% <100%> (-0.05%) ⬇️
src/window.c 83.05% <100%> (-0.49%) ⬇️
src/gui_beval.c 55.02% <0%> (-7.43%) ⬇️
src/message.c 76.45% <0%> (-0.25%) ⬇️
src/term.c 60.37% <0%> (-0.16%) ⬇️
src/syntax.c 78.9% <0%> (-0.13%) ⬇️
src/screen.c 80.36% <0%> (-0.11%) ⬇️
src/ex_cmds.c 81.63% <0%> (-0.1%) ⬇️
src/ui.c 50.14% <0%> (-0.08%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0251d2d...4596e92. Read the comment docs.

Bram Moolenaar

unread,
Mar 17, 2019, 11:40:29 AM3/17/19
to vim/vim, Subscribed

Closed #4113 via 647e24b.

lacygoill

unread,
Dec 8, 2021, 11:48:29 PM12/8/21
to vim/vim, Subscribed

If the quickfix buffer has been wiped out and no longer exists, getqflist() still gives its number:

vim9script
silent helpgrep grail
copen
silent :% bwipeout!
echomsg getqflist({qfbufnr: 0}).qfbufnr
3

Is it working as intended? It seems to contradict :help getqflist() which says:

Returns 0 if the quickfix buffer is not present.

Since the quickfix buffer is no longer present, shouldn't getqflist() give 0?


You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Yegappan Lakshmanan

unread,
Dec 9, 2021, 1:07:24 AM12/9/21
to vim_dev, reply+ACY5DGCOZWQBRGTFVR...@reply.github.com, vim/vim, Subscribed
Hi,

On Wed, Dec 8, 2021 at 8:48 PM lacygoill <vim-dev...@256bit.org> wrote:

If the quickfix buffer has been wiped out and no longer exists, getqflist() still gives its number:

vim9script
silent helpgrep grail
copen
silent :% bwipeout!
echomsg getqflist({qfbufnr: 0}).qfbufnr
3

Is it working as intended? It seems to contradict :help getqflist() which says:

Returns 0 if the quickfix buffer is not present.

Since the quickfix buffer is no longer present, shouldn't getqflist() give 0?



This is a bug. I have opened PR #9306 to address this.

Regards,
Yegappan
 

vim-dev ML

unread,
Dec 9, 2021, 1:07:40 AM12/9/21
to vim/vim, vim-dev ML, Your activity

Hi,


On Wed, Dec 8, 2021 at 8:48 PM lacygoill ***@***.***> wrote:

> If the quickfix buffer has been wiped out and no longer exists,
> getqflist() still gives its number:
>
> vim9scriptsilent helpgrep grailcopensilent :% bwipeout!echomsg getqflist({qfbufnr: 0}).qfbufnr

>
> 3
>
> Is it working as intended? It seems to contradict :help getqflist()
> <https://vimhelp.org/eval.txt.html#getqflist%28%29> which says:
>
> Returns 0 if the quickfix buffer is not present.
>
> Since the quickfix buffer is no longer present, shouldn't getqflist()
> give 0?
>
>
>
This is a bug. I have opened PR #9306 to address this.

Regards,
Yegappan


You are receiving this because you are subscribed to this thread.

Reply all
Reply to author
Forward
0 new messages