mirror of
https://github.com/neovim/neovim.git
synced 2026-08-27 17:41:48 +00:00
vim-patch:9.1.1528: completion: crash with getcompletion()
Problem: completion: crash with getcompletion()
(zeertzjq)
Solution: Don't set may_expand_pattern in f_getcompletion(),
unset may_expand_pattern() once it is not longer needed
(Girish Palya).
fixes: vim/vim#17680
closes: vim/vim#17686
f2ec8d4afc
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -249,13 +249,14 @@ int nextwild(expand_T *xp, int type, int options, bool escape)
|
||||
char *p;
|
||||
|
||||
if (xp->xp_numfiles == -1) {
|
||||
may_expand_pattern = options & WILD_MAY_EXPAND_PATTERN;
|
||||
pre_incsearch_pos = xp->xp_pre_incsearch_pos;
|
||||
if (ccline->input_fn && ccline->xp_context == EXPAND_COMMANDS) {
|
||||
// Expand commands typed in input() function
|
||||
set_cmd_context(xp, ccline->cmdbuff, ccline->cmdlen, ccline->cmdpos, false);
|
||||
} else {
|
||||
may_expand_pattern = options & WILD_MAY_EXPAND_PATTERN;
|
||||
set_expand_context(xp);
|
||||
may_expand_pattern = false;
|
||||
}
|
||||
if (xp->xp_context == EXPAND_LUA) {
|
||||
nlua_expand_pat(xp);
|
||||
|
||||
Reference in New Issue
Block a user