mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.1.0918: tiny Vim crashes with fuzzy buffer completion
Problem: tiny Vim crashes with fuzzy buffer completion Solution: Adjust #ifdefs in ExpandBufnames() (826814741_6) closes: #16200 Signed-off-by: h-east <h.east.727@gmail.com> Signed-off-by: 826814741_6 <44406129+826814741-6@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
eed63f96d2
commit
dff3c9c1a7
@@ -2985,9 +2985,9 @@ ExpandBufnames(
|
|||||||
vim_free(patc);
|
vim_free(patc);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEAT_VIMINFO
|
|
||||||
if (!fuzzy)
|
if (!fuzzy)
|
||||||
{
|
{
|
||||||
|
#ifdef FEAT_VIMINFO
|
||||||
if (matches != NULL)
|
if (matches != NULL)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -3007,13 +3007,13 @@ ExpandBufnames(
|
|||||||
}
|
}
|
||||||
vim_free(matches);
|
vim_free(matches);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (fuzzymatches_to_strmatches(fuzmatch, file, count, FALSE) == FAIL)
|
if (fuzzymatches_to_strmatches(fuzmatch, file, count, FALSE) == FAIL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
*num_file = count;
|
*num_file = count;
|
||||||
return (count == 0 ? FAIL : OK);
|
return (count == 0 ? FAIL : OK);
|
||||||
|
@@ -21,7 +21,8 @@ SCRIPTS_TINY = \
|
|||||||
test25 \
|
test25 \
|
||||||
test26 \
|
test26 \
|
||||||
test27 \
|
test27 \
|
||||||
test28
|
test28 \
|
||||||
|
test29
|
||||||
|
|
||||||
SCRIPTS_TINY_OUT = \
|
SCRIPTS_TINY_OUT = \
|
||||||
test10.out \
|
test10.out \
|
||||||
@@ -33,7 +34,8 @@ SCRIPTS_TINY_OUT = \
|
|||||||
test25.out \
|
test25.out \
|
||||||
test26.out \
|
test26.out \
|
||||||
test27.out \
|
test27.out \
|
||||||
test28.out
|
test28.out \
|
||||||
|
test29.out
|
||||||
|
|
||||||
# Tests for Vim9 script.
|
# Tests for Vim9 script.
|
||||||
TEST_VIM9 = \
|
TEST_VIM9 = \
|
||||||
|
14
src/testdir/test29.in
Normal file
14
src/testdir/test29.in
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Test for buffer name completion when 'wildoptions' contains "fuzzy"
|
||||||
|
(Confirm that Vim does not crash)
|
||||||
|
|
||||||
|
STARTTEST
|
||||||
|
:set wildoptions=fuzzy
|
||||||
|
:new buf_a
|
||||||
|
:b buf_a
|
||||||
|
:q!
|
||||||
|
:set wildoptions&
|
||||||
|
:$w! test.out
|
||||||
|
:qa!
|
||||||
|
ENDTEST
|
||||||
|
|
||||||
|
I'm alive!
|
1
src/testdir/test29.ok
Normal file
1
src/testdir/test29.ok
Normal file
@@ -0,0 +1 @@
|
|||||||
|
I'm alive!
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
918,
|
||||||
/**/
|
/**/
|
||||||
917,
|
917,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user