On 3 August 2013, David Szotten <[email protected]> wrote:
> Hi,
>
> the help for extend (`:help extend`) includes the following paragraph
>
> < When {expr1} is the same List as {expr2} then the number of
> items copied is equal to the original length of the List.
> E.g., when {expr3} is 1 you get N new copies of the first item
> (where N is the original length of the List).
>
> I find both the behaviour and the help text quite confusing. Having
> eventually understood the behaviour, it seems to me this might be an
> implementation accident that's been documented as a feature. I wonder
> if the help should just say something like "Using the same list for
> expr1 and expr2 [, with expr3 > 0] is not recommended
I have no idea if this is an intentional feature in Vim, but the
same trick was widely used back in the days of 8-bit processors to
quickly fill memory with a given value. :) So, even if it is just a
documented bug, to some of us it's an old friend :)
/lcd
--
--
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/groups/opt_out.