diff runtime/doc/eval.txt @ 5763:c52a655d927d

Update runtime files.
author Bram Moolenaar <bram@vim.org>
date Thu, 27 Mar 2014 22:30:07 +0100
parents ddc3f32a4b21
children d2286df8719d
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*	For Vim version 7.4.  Last change: 2014 Mar 22
+*eval.txt*	For Vim version 7.4.  Last change: 2014 Mar 27
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -5978,7 +5978,7 @@ tabpagenr([{arg}])					*tabpagenr()*
 		The number can be used with the |:tab| command.
 
 
-tabpagewinnr({tabarg}, [{arg}])				*tabpagewinnr()*
+tabpagewinnr({tabarg} [, {arg}])			*tabpagewinnr()*
 		Like |winnr()| but for tab page {tabarg}.
 		{tabarg} specifies the number of tab page to be used.
 		{arg} is used like with |winnr()|:
@@ -7481,11 +7481,19 @@ 7. Commands						*expression-commands*
 		:execute "!ls " . shellescape(filename, 1)
 <
 			Note: The executed string may be any command-line, but
-			you cannot start or end a "while" or "for" command.
-			Thus this is illegal: >
-		:execute 'while i > 5'
-		:execute 'echo "test" | break'
-		:endwhile
+			starting or ending "if", "while" and "for" does not
+			always work, because when commands are skipped the
+			":execute" is not evaluated and Vim loses track of
+			where blocks start and end.  Also "break" and
+			"continue" should not be inside ":execute".
+			This example does not work, because the ":execute" is
+			not evaluated and Vim does not see the "while", and
+			gives an error for finding an ":endwhile": >
+		:if 0
+		: execute 'while i > 5'
+		:  echo "test"
+		: endwhile
+		:endif
 <
 			It is allowed to have a "while" or "if" command
 			completely in the executed string: >