summaryrefslogtreecommitdiff
path: root/src/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/edit.c b/src/edit.c
index b1a13a9e1..c16daddde 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -2111,7 +2111,7 @@ ins_compl_add_infercase(str, len, icase, fname, dir, flags)
int has_lower = FALSE;
int was_letter = FALSE;
- if (p_ic && curbuf->b_p_inf)
+ if (p_ic && curbuf->b_p_inf && len > 0)
{
/* Infer case of completed part. */
@@ -2225,7 +2225,7 @@ ins_compl_add_infercase(str, len, icase, fname, dir, flags)
wca[i] = MB_TOUPPER(wca[i]);
}
- /*
+ /*
* Generate encoding specific output from wide character array.
* Multi-byte characters can occupy up to five bytes more than
* ASCII characters, and we also need one byte for NUL, so stay