aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/edit.c5
-rw-r--r--src/nvim/ex_getln.c2
2 files changed, 1 insertions, 6 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index df45f57606..eb993d08a9 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -4331,10 +4331,7 @@ static int ins_complete(int c)
compl_col += startcol;
compl_length = (int)curs_col - startcol;
- compl_pattern = addstar(line + compl_col, compl_length,
- EXPAND_FILES);
- if (compl_pattern == NULL)
- return FAIL;
+ compl_pattern = addstar(line + compl_col, compl_length, EXPAND_FILES);
} else if (ctrl_x_mode == CTRL_X_CMDLINE) {
compl_pattern = vim_strnsave(line, curs_col);
set_cmd_context(&compl_xp, compl_pattern,
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index ae8ec4637f..f1e53952e8 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -3505,8 +3505,6 @@ expand_cmdline (
/* add star to file name, or convert to regexp if not exp. files. */
xp->xp_pattern_len = (int)(str + col - xp->xp_pattern);
file_str = addstar(xp->xp_pattern, xp->xp_pattern_len, xp->xp_context);
- if (file_str == NULL)
- return EXPAND_UNSUCCESSFUL;
if (p_wic)
options += WILD_ICASE;