Hi,

as reported by Benjamin R. Haskell on vim-use, the second example in the
map() documentation is wrong, using '&' instead of 'v:val'. Here is a
patch that corrects it.

Jan

-- 
-[ OpenPGP key ID: 00A0FD5F ]-
The most dangerous phrase in the language is, "We've always done it this
way."
                -- Grace Hopper

-- 
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
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 0df4ba4..a626191 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -4033,7 +4033,7 @@ map({expr}, {string})					*map()*
 
 		The operation is done in-place.  If you want a |List| or
 		|Dictionary| to remain unmodified make a copy first: >
-			:let tlist = map(copy(mylist), ' & . "\t"')
+			:let tlist = map(copy(mylist), ' v:val . "\t"')
 
 <		Returns {expr}, the |List| or |Dictionary| that was filtered.
 		When an error is encountered while evaluating {string} no

Raspunde prin e-mail lui