Hi, On Mon, Aug 8, 2016 at 10:04 AM, Nikolay Aleksandrovich Pavlov <[email protected]> wrote: > 2016-08-08 19:44 GMT+03:00 LCD 47 <[email protected]>: >> On 8 August 2016, Kent Sibilev <[email protected]> wrote: >>> On Monday, August 8, 2016 at 4:03:22 AM UTC-4, LCD 47 wrote: >>> >>> > >>> > Wait, isn't the title already supposed to tell you that? >>> > >>> >>> What do you mean by title? >> >> From the manual (":h :copen"): >> >> : The window will have the w:quickfix_title variable set >> : which will indicate the command that produced the >> : quickfix list. This can be used to compose a custom >> : status line if the value of 'statusline' is adjusted >> : properly. >> >> By default the status line of the quickfix open shows "[Quickfix >> List]" or "[Location List]", followed by the w:quickfix_title variable >> described above. Some of the plugins that customize status lines choose >> to ignore that information. I don't think this is something that needs >> to be fixed in Vim. > > w:quickfix_title cannot be used: e.g. install > https://github.com/rking/ag.vim and run `:Ag -w test` then `:LAg -w > test`. If you use :copen and :lopen then you will see that in both > cases `w:quickfix_title` is `:ag --vimgrep -w test`: completely > useless. > > `[Quickfix List]` vs `[Location List]` can neither be used because > they are translated as Bram said. Also parsing anything to get this > information sounds like a bad idea. > > --- > > By the way, I remember some patches that add functions returning > information about buffer/window/tabpage. It would be logical if > information regarding whether given buffer contains > quickfix/location/no list was included there. >
I agree. The patch to get information about a buffer/window/tab page is at: https://github.com/vim/vim/pull/833 The information about the quickfix/location list window/buffer can be added to this patch. Another alternative is the patch I sent two weeks ago to extend the getqflist() and getloclist() functions. The returned dictionary contains the 'winid' key which has the window ID of the quickfix or location list window. - Yegappan -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
