Yegappan Lakshmanan wrote:

> >> The attached patch implements the below described changes to the
> >> argc() and argv() functions, updates the documentation and
> >> adds new tests.
> >>
> >> - Yegappan
> >>
> >> On Wed, Jan 20, 2016 at 12:45 PM, Yegappan Lakshmanan
> >> <[email protected]> wrote:
> >> > Hi all,
> >> >
> >> > A Vim window can use either the global argument list or a local argument
> >> > list.  The argv() and argc() functions currently support only the
> >> > argument list for the current window. You cannot use these functions to
> >> > get the argument list for any window in any tab page.
> >> >
> >> > I am proposing the following additions to the argv() and argc()
> >> > functions to support this:
> >> >
> >> > argc()
> >> >     Return the number of files in the argument list of the current
> >> >     window. <already supported>
> >> > argc({winnr})
> >> >     Return the number of files in the argument list of the specified
> >> >     window in the current tab page.
> >> > argc({winnr}, {tabnr})
> >> >     Return the number of files in the argument list of the specified
> >> >     window in the specified tab page.
> >
> > How about argc(-1) and argc(-1, -1) return the global arglist?
> >
> >> > argv()
> >> >     Return the argument list for the current window. <already supported>
> >> > argv({nr})
> >> >     Return the {nr}th file in the argument list for the current window.
> >> >     <already supported>
> >> > argv({nr}, {winnr})
> >> >     Return the {nr}th file in the argument list for the specified window
> >> >     in the current tab page.
> >> > argv({nr}, {winnr}, {tabnr})
> >> >     Return the {nr}th file in the argument list for the specified window
> >> >     in the specified tab page.
> >> > argv(-1, {winnr})
> >> >     Return the argument list for the specified window in the current tab 
> >> > page.
> >> > argv(-1, {winnr}, {tabnr})
> >> >     Return the argument list for the specified window in the specified
> >> >     tab page.
> >> >
> >> > Any comments on the proposed enhancements?
> >
> > And argv({nr}, -1) and argv({nr}, -1, -1) use the global argument list?
> >
> 
> The attached updated patch also supports the above mentioned arguments
> to operate on the global argument list.

Thanks for the quick response!

-- 
It is hard to understand how a cemetery raised its burial
cost and blamed it on the cost of living.

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