diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2026-02-16 14:31:51 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-16 14:31:51 +0800 |
| commit | b51fc202ce06ea980ea7ad1d25990ef509f113bb (patch) | |
| tree | 25c00f0b69407011930fff57ebe73b55f2a4270b /src/nvim/eval.lua | |
| parent | 1eb2ca9fcfbc5df443062c5a302f1da6b1a93377 (diff) | |
| download | rneovim-b51fc202ce06ea980ea7ad1d25990ef509f113bb.tar.gz rneovim-b51fc202ce06ea980ea7ad1d25990ef509f113bb.tar.bz2 rneovim-b51fc202ce06ea980ea7ad1d25990ef509f113bb.zip | |
vim-patch:3de7384: runtime(doc): Fix :help complete() example (#37891)
closes: vim/vim#18417
https://github.com/vim/vim/commit/3de73844afebe133ea7485cc9993bb8378a3717d
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Diffstat (limited to 'src/nvim/eval.lua')
| -rw-r--r-- | src/nvim/eval.lua | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 52af400e40..13f9ca4fac 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -1363,14 +1363,16 @@ M.funcs = { Insert mode completion. The popup menu will appear if specified, see |ins-completion-menu|. Example: >vim - inoremap <F5> <C-R>=ListMonths()<CR> - func ListMonths() - call complete(col('.'), ['January', 'February', 'March', - \ 'April', 'May', 'June', 'July', 'August', 'September', - \ 'October', 'November', 'December']) - return '' - endfunc + inoremap <F5> <C-R>=ListMonths()<CR> + + func ListMonths() + call complete(col('.'), ['January', 'February', 'March', + \ 'April', 'May', 'June', 'July', 'August', + \ 'September', 'October', 'November', 'December']) + return '' + endfunc + <This isn't very useful, but it shows how it works. Note that an empty string is returned to avoid a zero being inserted. |