On 21/10/08 13:53, Nikolai Weibull wrote:
> Has remove() always thrown an error if idx is beyond the end of list?
>
> Either way, what's the reasoning behind it doing so?  If the items
> aren't there to begin with, then great, that's precisely what I want.
>
> The documentation should be updated to reflect this state of affairs.
>
> Here's a patch:
>
> --- eval.txt    2008-08-09 21:45:52.000000000 +0200
> +++ eval.txt.new        2008-10-21 13:51:50.000000000 +0200
> @@ -4482,8 +4482,10 @@
>                  return it.
>                  With {end}: Remove items from {idx} to {end} (inclusive) and
>                  return a list with these items.  When {idx} points to the 
> same
> -               item as {end} a list with one item is returned.  When {end}
> -               points to an item before {idx} this is an error.
> +               item as {end} a list with one item is returned.  When {idx}
> +                points to an item beyond the last one in {list} this is an
> +                error.  When {end} points to an item before {idx} this is an
> +                error.
>                  See |list-index| for possible values of {idx} and {end}.
>                  Example:>
>                          :echo "last item: " . remove(mylist, -1)
>
> The formulation isn't very good, but it's in sync with the other comments.

Please apply your patches to the latest version of the file. In eval.txt 
dated 2008 Sep 14, line, 4482 to 4489 are

                {only available when compiled with the |+clientserver| feature}
                Note: Any errors will be reported in the server and may mess
                up the display.
                Examples: >
                :echo remote_send("gvim", ":DropAndReply ".file, "serverid").
                 \ remote_read(serverid)

                :autocmd NONE RemoteReply *



within the help for remote_send(); IOW your pointer is 14 lines too short.

Best regards,
Tony.
-- 
If you explain so clearly that nobody can misunderstand, somebody
will.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui