Re: [vim/vim] location list: get corresponding / parent window id (#3202)

2018-09-01 Fir de Conversatie Yegappan Lakshmanan
Hi,

On Thu, Jul 12, 2018 at 10:53 PM Yegappan Lakshmanan
 wrote:
>
> Hi,
>
> On Thu, Jul 12, 2018 at 2:57 PM, Daniel Hahler
>  wrote:
> > Thank you!
> >
> > With this patch, when getloclist() is called from the location list window,
> > the 'winid' is set to the identifier of the window containing the location
> > list.
> >
> > Isn't that too magical, and also not backwards compatible?
> >
>
> Yes. I was trying to reduce the number of different window identifiers
> returned by the function. But this will break backward compatibility.
>
> >
> > I think getloclist(0, {'what': 1}) should return the same regardless from if
> > you are in the window or its location list window.
> >
> > Therefore a new entry should be added, e.g. parent_winid.
> >
>
> The window with the location list is not really a parent of the
> location list window.
> So what about calling the new item as "loclistwinid" or "llwinid" instead
> of "parent_winid"? This will be only returned by the getloclist() function.
>

I am attaching an updated patch that adds 'filewinid' field to the list returned
by the getloclist() function. This patch also includes a test and update
to the documentation.

- 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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


qfwinid.diff
Description: Binary data


Re: [vim/vim] location list: get corresponding / parent window id (#3202)

2018-07-12 Fir de Conversatie Yegappan Lakshmanan
Hi,

On Thu, Jul 12, 2018 at 2:57 PM, Daniel Hahler
 wrote:
> Thank you!
>
> With this patch, when getloclist() is called from the location list window,
> the 'winid' is set to the identifier of the window containing the location
> list.
>
> Isn't that too magical, and also not backwards compatible?
>

Yes. I was trying to reduce the number of different window identifiers
returned by the function. But this will break backward compatibility.

>
> I think getloclist(0, {'what': 1}) should return the same regardless from if
> you are in the window or its location list window.
>
> Therefore a new entry should be added, e.g. parent_winid.
>

The window with the location list is not really a parent of the
location list window.
So what about calling the new item as "loclistwinid" or "llwinid" instead
of "parent_winid"? This will be only returned by the getloclist() function.

Regards,
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [vim/vim] location list: get corresponding / parent window id (#3202)

2018-07-12 Fir de Conversatie Yegappan Lakshmanan
Hi Daniel,

On Thu, Jul 12, 2018 at 1:36 PM, Daniel Hahler
 wrote:
> There is "winid" in getloclist(0, {'all': 1}) already, but this corresponds
> to the location list window itself.
>
> I would like to get the id of the window that the location list window is
> for.
>
> For quickfix lists this would return 0 then.
>

Can you try the attached patch? With this patch, when getloclist() is called
from the location list window, the 'winid' is set to the identifier of
the window
containing the location list.

Thanks,
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


qfwinid.diff
Description: Binary data