summaryrefslogtreecommitdiffstats
path: root/src/cmdexpand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmdexpand.c')
-rw-r--r--src/cmdexpand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index d27e039443..8bccaa3bb0 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -260,7 +260,7 @@ nextwild(
{
if (cmdline_fuzzy_completion_supported(xp))
// If fuzzy matching, don't modify the search string
- p1 = vim_strsave(xp->xp_pattern);
+ p1 = vim_strnsave(xp->xp_pattern, xp->xp_pattern_len);
else
p1 = addstar(xp->xp_pattern, xp->xp_pattern_len, xp->xp_context);