aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-02-28 21:07:56 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-02-28 21:27:43 +0800
commit278aeee3aed753d1084597378e653395bd472c42 (patch)
tree4790d7d0eb363611d524dad5b09e2687bec2a1ec /runtime
parent1e513fd112767e57f2b39dfaa395c83cb4f6a9f7 (diff)
downloadrneovim-278aeee3aed753d1084597378e653395bd472c42.tar.gz
rneovim-278aeee3aed753d1084597378e653395bd472c42.tar.bz2
rneovim-278aeee3aed753d1084597378e653395bd472c42.zip
vim-patch:9.0.0430: cannot use repeat() with a blob
Problem: Cannot use repeat() with a blob. Solution: Implement blob repeat. (closes vim/vim#11090) https://github.com/vim/vim/commit/375141e1f80dced9be738568a3418f65813f4a2f Co-authored-by: Bakudankun <bakudankun@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/builtin.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index b194a104f7..7fab2ac6ff 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -380,7 +380,8 @@ remove({blob}, {idx} [, {end}]) Number/Blob
remove bytes {idx}-{end} from {blob}
remove({dict}, {key}) any remove entry {key} from {dict}
rename({from}, {to}) Number rename (move) file from {from} to {to}
-repeat({expr}, {count}) String repeat {expr} {count} times
+repeat({expr}, {count}) List/Blob/String
+ repeat {expr} {count} times
resolve({filename}) String get filename a shortcut points to
reverse({list}) List reverse {list} in-place
round({expr}) Float round off {expr}
@@ -6420,8 +6421,8 @@ repeat({expr}, {count}) *repeat()*
result. Example: >
:let separator = repeat('-', 80)
< When {count} is zero or negative the result is empty.
- When {expr} is a |List| the result is {expr} concatenated
- {count} times. Example: >
+ When {expr} is a |List| or a |Blob| the result is {expr}
+ concatenated {count} times. Example: >
:let longlist = repeat(['a', 'b'], 3)
< Results in ['a', 'b', 'a', 'b', 'a', 'b'].