diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-20 10:14:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-20 16:14:19 +0100 |
commit | 8e9aa81919e743b14d33127e7e9b4445044c46a0 (patch) | |
tree | 999a5ffb9c66d1135ba6bb37974bf5223b98a4cc | |
parent | 9539d46bb120ac135f390600ea6f82112478ef1d (diff) | |
download | rneovim-8e9aa81919e743b14d33127e7e9b4445044c46a0.tar.gz rneovim-8e9aa81919e743b14d33127e7e9b4445044c46a0.tar.bz2 rneovim-8e9aa81919e743b14d33127e7e9b4445044c46a0.zip |
vim-patch:8.2.1289: crash when using a custom completion function (#13565)
Problem: Crash when using a custom completion function.
Solution: Initialize all of the expand_T. (closes vim/vim#6532)
https://github.com/vim/vim/commit/c841afff6a89592f23710c6da5b0fea89b240937
Cherry-pick CLEAR_POINTER macro from patch v8.2.0559.
N/A patches for version.c:
vim-patch:8.1.1295: when vimrun.exe does not exist external command may fail
Problem: When vimrun.exe does not exist external command may fail.
Solution: Use "cmd /c" twice to get the same behavior. (Ken Takata,
closes vim/vim#4355)
https://github.com/vim/vim/commit/98ffe4c6d8bded840436cfec0f26dd9c9bce4939
vim-patch:8.2.2155: warning from Github actions for code analysis
Problem: Warning from Github actions for code analysis.
Solution: Remove the "git checkout HEAD^2" block.
https://github.com/vim/vim/commit/18f69229c581a0f738145cdec70df66723a518fc
vim-patch:8.2.2156: Github actions run on pusing a tag
Problem: Github actions run on pusing a tag.
Solution: Don't run CI on tag push. Omit coveralls on pull-request.
(Ozaki Kiichi, closes vim/vim#7489)
https://github.com/vim/vim/commit/b5b77378bc35cb268c384e98c59f2bf8cb406270
vim-patch:8.2.2158: CI on cirrus times out, coveralls doesn't always run
Problem: CI on cirrus times out, coveralls doesn't always run.
Solution: Set timeout to 20 minutes. Adjust condition. (closes vim/vim#7493)
https://github.com/vim/vim/commit/6e562fcc07c71ad1437c89c3d3cc423efb691f0a
-rw-r--r-- | src/nvim/ex_getln.c | 12 | ||||
-rw-r--r-- | src/nvim/vim.h | 1 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index a0910f1394..129cb323ea 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -4229,17 +4229,11 @@ ExpandOne ( * Prepare an expand structure for use. */ void ExpandInit(expand_T *xp) + FUNC_ATTR_NONNULL_ALL { - xp->xp_pattern = NULL; - xp->xp_pattern_len = 0; + CLEAR_POINTER(xp); xp->xp_backslash = XP_BS_NONE; -#ifndef BACKSLASH_IN_FILENAME - xp->xp_shell = FALSE; -#endif xp->xp_numfiles = -1; - xp->xp_files = NULL; - xp->xp_arg = NULL; - xp->xp_line = NULL; } /* @@ -5399,7 +5393,7 @@ static void expand_shellcmd(char_u *filepat, int *num_file, char_u ***file, } /// Call "user_expand_func()" to invoke a user defined Vim script function and -/// return the result (either a string or a List). +/// return the result (either a string, a List or NULL). static void * call_user_expand_func(user_expand_func_T user_expand_func, expand_T *xp, int *num_file, char_u ***file) FUNC_ATTR_NONNULL_ALL diff --git a/src/nvim/vim.h b/src/nvim/vim.h index 900f2acd81..01f20cf29a 100644 --- a/src/nvim/vim.h +++ b/src/nvim/vim.h @@ -208,6 +208,7 @@ enum { FOLD_TEXT_LEN = 51 }; //!< buffer size for get_foldtext() // Size in bytes of the hash used in the undo file. #define UNDO_HASH_SIZE 32 +#define CLEAR_POINTER(ptr) memset((ptr), 0, sizeof(*(ptr))) // defines to avoid typecasts from (char_u *) to (char *) and back // (vim_strchr() is now in strings.c) |