Marcin Szamotulski wrote:

> > > > > I'm sure someone will ask for another thing: What local argument
> > > > > list is being used.  They can be shared between windows.
> > > > > 
> > > > > A more generic solution would be to request the ID of the local
> > > > > argument list.  When zero, then the window is using the global
> > > > > argument list.
> > > > > 
> > > > > And then we of course also want to optionally pass in the window
> > > > > number.  So it would be:
> > > > > 
> > > > >       arglistid([winnr])
> > > > 
> > > > Yes that's much better solution.  I have a question though.  The
> > > > alist_T structure does not contain an ID of arglist (only list of
> > > > files, and number of windows using it).  How should I generate the
> > > > ID?
> > > 
> > > You could use the pointer and turn it into an int, but that's ugly (and
> > > doesn't work if sizeof(int) is smaller than sizeof(char *).
> > > 
> > > So the best is to add an ID to alist_T and use a static global to store
> > > the last used ID.  That's in alist_new().
> > 
> > Thanks.  I'll follow your advice.
> 
> I attach the patch for arglistid().

Thanks, I'll add it in the todo list.


-- 
>From "know your smileys":
 :-&    Eating spaghetti

 /// Bram Moolenaar -- [email protected] -- 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 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.

Raspunde prin e-mail lui