diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-01-23 14:36:06 +0100 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-01-27 01:33:32 +0100 |
commit | 46065f697885cc66a9a1cbdb6653dfd25ae1ef28 (patch) | |
tree | 387f838d3bfbc86ba10e1e51fcbe32aa4c8ad33a | |
parent | 8d6778a4d150e31659c93e61e441a6209572b534 (diff) | |
download | rneovim-46065f697885cc66a9a1cbdb6653dfd25ae1ef28.tar.gz rneovim-46065f697885cc66a9a1cbdb6653dfd25ae1ef28.tar.bz2 rneovim-46065f697885cc66a9a1cbdb6653dfd25ae1ef28.zip |
Remove nonnullret deadcode: str_foldcase & vim_strnsave.
-rw-r--r-- | src/nvim/edit.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index eb993d08a9..11ff37d033 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -4135,7 +4135,7 @@ static int ins_compl_use_match(int c) /* * Do Insert mode completion. * Called when character "c" was typed, which has a meaning for completion. - * Returns OK if completion was done, FAIL if something failed (out of mem). + * Returns OK if completion was done, FAIL if something failed. */ static int ins_complete(int c) { @@ -4236,13 +4236,9 @@ static int ins_complete(int c) compl_length = curs_col - startcol; } if (p_ic) - compl_pattern = str_foldcase(line + compl_col, - compl_length, NULL, 0); + compl_pattern = str_foldcase(line + compl_col, compl_length, NULL, 0); else - compl_pattern = vim_strnsave(line + compl_col, - compl_length); - if (compl_pattern == NULL) - return FAIL; + compl_pattern = vim_strnsave(line + compl_col, compl_length); } else if (compl_cont_status & CONT_ADDING) { char_u *prefix = (char_u *)"\\<"; @@ -4309,12 +4305,9 @@ static int ins_complete(int c) if (compl_length < 0) /* cursor in indent: empty pattern */ compl_length = 0; if (p_ic) - compl_pattern = str_foldcase(line + compl_col, compl_length, - NULL, 0); + compl_pattern = str_foldcase(line + compl_col, compl_length, NULL, 0); else compl_pattern = vim_strnsave(line + compl_col, compl_length); - if (compl_pattern == NULL) - return FAIL; } else if (ctrl_x_mode == CTRL_X_FILES) { /* Go back to just before the first filename character. */ if (startcol > 0) { |