diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-24 17:55:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-24 17:55:32 +0800 |
commit | 9418381ccca5bf749b2f10b8a31d6e0900898ffa (patch) | |
tree | dafdd3112ce8e377c3f31bd8f0348fa6bbde1a5b | |
parent | acb13c7ac770ee3feee3e79e0e3cf57b37bf1942 (diff) | |
download | rneovim-9418381ccca5bf749b2f10b8a31d6e0900898ffa.tar.gz rneovim-9418381ccca5bf749b2f10b8a31d6e0900898ffa.tar.bz2 rneovim-9418381ccca5bf749b2f10b8a31d6e0900898ffa.zip |
vim-patch:a35235e824bb (#27598)
runtime(doc) Update help text for matchbufline() and matchstrlist()
closes: vim/vim#14080
https://github.com/vim/vim/commit/a35235e824bb77df0cebdb2bd290e13f1201b292
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
-rw-r--r-- | runtime/doc/builtin.txt | 7 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/vimfn.lua | 7 | ||||
-rw-r--r-- | src/nvim/eval.lua | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index d6a14d9227..aa9bc4836f 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -4437,6 +4437,7 @@ match({expr}, {pat} [, {start} [, {count}]]) *match()* Note that when {count} is added the way {start} works changes, see above. + *match-pattern* See |pattern| for the patterns that are accepted. The 'ignorecase' option is used to set the ignore-caseness of the pattern. 'smartcase' is NOT used. The matching is always @@ -4573,6 +4574,9 @@ matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}]) *matchbufline()* This function works only for loaded buffers. First call |bufload()| if needed. + See |match-pattern| for information about the effect of some + option settings on the pattern. + When {buf} is not a valid buffer, the buffer is not loaded or {lnum} or {end} is not valid then an error is given and an empty |List| is returned. @@ -4747,6 +4751,9 @@ matchstrlist({list}, {pat} [, {dict}]) *matchstrlist()* submatches a List of submatches. Present only if "submatches" is set to v:true in {dict}. + See |match-pattern| for information about the effect of some + option settings on the pattern. + Example: >vim :echo matchstrlist(['tik tok'], '\<\k\+\>') [{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}] diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index 623ce2bc0f..07e6d42e1c 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -5356,6 +5356,7 @@ function vim.fn.mapset(dict) end --- Note that when {count} is added the way {start} works changes, --- see above. --- +--- *match-pattern* --- See |pattern| for the patterns that are accepted. --- The 'ignorecase' option is used to set the ignore-caseness of --- the pattern. 'smartcase' is NOT used. The matching is always @@ -5514,6 +5515,9 @@ function vim.fn.matcharg(nr) end --- This function works only for loaded buffers. First call --- |bufload()| if needed. --- +--- See |match-pattern| for information about the effect of some +--- option settings on the pattern. +--- --- When {buf} is not a valid buffer, the buffer is not loaded or --- {lnum} or {end} is not valid then an error is given and an --- empty |List| is returned. @@ -5727,6 +5731,9 @@ function vim.fn.matchstr(expr, pat, start, count) end --- submatches a List of submatches. Present only if --- "submatches" is set to v:true in {dict}. --- +--- See |match-pattern| for information about the effect of some +--- option settings on the pattern. +--- --- Example: >vim --- :echo matchstrlist(['tik tok'], '\<\k\+\>') --- [{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}] diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 9cca9c588a..87850422b2 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -6546,6 +6546,7 @@ M.funcs = { Note that when {count} is added the way {start} works changes, see above. + *match-pattern* See |pattern| for the patterns that are accepted. The 'ignorecase' option is used to set the ignore-caseness of the pattern. 'smartcase' is NOT used. The matching is always @@ -6726,6 +6727,9 @@ M.funcs = { This function works only for loaded buffers. First call |bufload()| if needed. + See |match-pattern| for information about the effect of some + option settings on the pattern. + When {buf} is not a valid buffer, the buffer is not loaded or {lnum} or {end} is not valid then an error is given and an empty |List| is returned. @@ -6960,6 +6964,9 @@ M.funcs = { submatches a List of submatches. Present only if "submatches" is set to v:true in {dict}. + See |match-pattern| for information about the effect of some + option settings on the pattern. + Example: >vim :echo matchstrlist(['tik tok'], '\<\k\+\>') [{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}] |