aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-26 08:38:21 +0800
committerGitHub <noreply@github.com>2022-04-26 08:38:21 +0800
commitd7a731595752244380090dfbe776b8c1334b93cb (patch)
tree35fc0d09a0eab693f7bf1110f0433a8f54448bb4 /runtime
parentaf82eab946cf9f36e544b0591b8c8c02e8ddf316 (diff)
parent13e54f713034e1a38eaf613d11b43ea8c42ca7df (diff)
downloadrneovim-d7a731595752244380090dfbe776b8c1334b93cb.tar.gz
rneovim-d7a731595752244380090dfbe776b8c1334b93cb.tar.bz2
rneovim-d7a731595752244380090dfbe776b8c1334b93cb.zip
Merge pull request #18249 from zeertzjq/vim-8.2.4760
vim-patch:8.2.{4760,4765}: matchfuzzy() limit
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/builtin.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 81d7f4b83a..3e75914743 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -4975,7 +4975,7 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
If {list} is a list of dictionaries, then the optional {dict}
argument supports the following additional items:
- key key of the item which is fuzzy matched against
+ key Key of the item which is fuzzy matched against
{str}. The value of this item should be a
string.
text_cb |Funcref| that will be called for every item
@@ -4983,6 +4983,8 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
This should accept a dictionary item as the
argument and return the text for that item to
use for fuzzy matching.
+ limit Maximum number of matches in {list} to be
+ returned. Zero means no limit.
{str} is treated as a literal string and regular expression
matching is NOT supported. The maximum supported {str} length
@@ -4995,6 +4997,9 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
empty list is returned. If length of {str} is greater than
256, then returns an empty list.
+ When {limit} is given, matchfuzzy() will find up to this
+ number of matches in {list} and return them in sorted order.
+
Refer to |fuzzy-matching| for more information about fuzzy
matching strings.