summaryrefslogtreecommitdiffstats
path: root/runtime/doc
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-15 21:46:02 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-15 21:46:02 +0100
commitaa5341477c9f3840d63f709de3b9e5d0266f93d7 (patch)
treeed3a40bb10ad93bbf009e33ee6af623f409f3713 /runtime/doc
parenta4abe514ecd9b7a038feed89f48476809775c80f (diff)
patch 9.0.0473: fullcommand() only works for the current script versionv9.0.0473
Problem: fullcommand() only works for the current script version. Solution: Add an optional argument for the script version.
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/builtin.txt14
1 files changed, 10 insertions, 4 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index fb8b116010..53179ca85a 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -195,7 +195,7 @@ foldlevel({lnum}) Number fold level at {lnum}
foldtext() String line displayed for closed fold
foldtextresult({lnum}) String text for closed fold at {lnum}
foreground() Number bring the Vim window to the foreground
-fullcommand({name}) String get full command from {name}
+fullcommand({name} [, {vim9}]) String get full command from {name}
funcref({name} [, {arglist}] [, {dict}])
Funcref reference to function {name}
function({name} [, {arglist}] [, {dict}])
@@ -2967,14 +2967,20 @@ foreground() Move the Vim window to the foreground. Useful when sent from
{only in the Win32, Motif and GTK GUI versions and the
Win32 console version}
-fullcommand({name}) *fullcommand()*
+fullcommand({name} [, {vim9}]) *fullcommand()*
Get the full command name from a short abbreviated command
name; see |20.2| for details on command abbreviations.
The string argument {name} may start with a `:` and can
include a [range], these are skipped and not returned.
- Returns an empty string if a command doesn't exist or if it's
- ambiguous (for user-defined commands).
+ Returns an empty string if a command doesn't exist, if it's
+ ambiguous (for user-defined commands) or cannot be shortened
+ this way. |vim9-no-shorten|
+
+ Without the {vim9} argument uses the current script version.
+ If {vim9} is present and FALSE then legacy script rules are
+ used. When {vim9} is present and TRUE then Vim9 rules are
+ used, e.g. "en" is not a short form of "endif".
For example `fullcommand('s')`, `fullcommand('sub')`,
`fullcommand(':%substitute')` all return "substitute".