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>
diff --git a/src/buffer.c b/src/buffer.c
index 3b05f25..147d20d 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2985,9 +2985,9 @@
vim_free(patc);
}
-#ifdef FEAT_VIMINFO
if (!fuzzy)
{
+#ifdef FEAT_VIMINFO
if (matches != NULL)
{
int i;
@@ -3007,13 +3007,13 @@
}
vim_free(matches);
}
+#endif
}
else
{
if (fuzzymatches_to_strmatches(fuzmatch, file, count, FALSE) == FAIL)
return FAIL;
}
-#endif
*num_file = count;
return (count == 0 ? FAIL : OK);