diff runtime/doc/builtin.txt @ 28283:2fd2ce8a556c v8.2.4667

patch 8.2.4667: expandcmd() fails on an error Commit: https://github.com/vim/vim/commit/5018a836c030988944a9bbe2fd2e538bf5261a72 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Apr 2 21:12:21 2022 +0100 patch 8.2.4667: expandcmd() fails on an error Problem: expandcmd() fails on an error. Solution: On failure return the command unmodified. (yegappan Lakshmanan, closes #10063)
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 Apr 2022 22:15:03 +0200
parents e3d6184b89fa
children 425700af491b
line wrap: on
line diff
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -2299,10 +2299,13 @@ expandcmd({string})					*expandcmd()*
 		like with |expand()|, and environment variables, anywhere in
 		{string}.  "~user" and "~/path" are only expanded at the
 		start.
-		Returns the expanded string.  Example: >
+		Returns the expanded string.  If an error is encountered
+		during expansion, the unmodified {string} is returned.
+		Example: >
 			:echo expandcmd('make %<.o')
-
-<		Can also be used as a |method|: >
+<			make /path/runtime/doc/builtin.o ~
+
+		Can also be used as a |method|: >
 			GetCommand()->expandcmd()
 <
 extend({expr1}, {expr2} [, {expr3}])			*extend()*