forked from aniani/vim
patch 9.0.0473: fullcommand() only works for the current script version
Problem: fullcommand() only works for the current script version. Solution: Add an optional argument for the script version.
This commit is contained in:
@@ -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".
|
||||
|
||||
Reference in New Issue
Block a user