diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/nvim/edit.c | 14 | ||||
| -rw-r--r-- | src/nvim/path.c | 8 | ||||
| -rw-r--r-- | src/nvim/search.c | 2 | 
3 files changed, 9 insertions, 15 deletions
| diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 4a00a54e79..fa4e4b2835 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -2432,14 +2432,12 @@ void ins_compl_show_pum(void)        }    } -  if (compl_match_array != NULL) { -    /* Compute the screen column of the start of the completed text. -     * Use the cursor to get all wrapping and other settings right. */ -    col = curwin->w_cursor.col; -    curwin->w_cursor.col = compl_col; -    pum_display(compl_match_array, compl_match_arraysize, cur); -    curwin->w_cursor.col = col; -  } +  /* Compute the screen column of the start of the completed text. +   * Use the cursor to get all wrapping and other settings right. */ +  col = curwin->w_cursor.col; +  curwin->w_cursor.col = compl_col; +  pum_display(compl_match_array, compl_match_arraysize, cur); +  curwin->w_cursor.col = col;  }  #define DICT_FIRST      (1)     /* use just first element in "dict" */ diff --git a/src/nvim/path.c b/src/nvim/path.c index 0a19dabc01..e5f78440c2 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -881,11 +881,9 @@ static void uniquefy_paths(garray_T *gap, char_u *pattern)    }    free(curdir); -  if (in_curdir != NULL) { -    for (int i = 0; i < gap->ga_len; i++) -      free(in_curdir[i]); -    free(in_curdir); -  } +  for (int i = 0; i < gap->ga_len; i++) +    free(in_curdir[i]); +  free(in_curdir);    ga_clear_strings(&path_ga);    vim_regfree(regmatch.regprog); diff --git a/src/nvim/search.c b/src/nvim/search.c index 0721cb8fac..055d2db445 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -4025,8 +4025,6 @@ find_pattern_in_path (      def_regmatch.rm_ic = FALSE;         /* don't ignore case in define pat. */    }    files = xcalloc(max_path_depth, sizeof(SearchedFile)); -  if (files == NULL) -    goto fpip_end;    old_files = max_path_depth;    depth = depth_displayed = -1; | 
