diff options
author | dundargoc <gocdundar@gmail.com> | 2023-11-11 11:20:08 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-11 13:31:17 +0100 |
commit | 8e58d37f2e15ac8540377148e55ed08a039aadb6 (patch) | |
tree | 799dd1f30d375ac8cdeae196fceec9d2ad0f134a /src/nvim/path.c | |
parent | c4ad15ae324f6460c683a64c44d65e693e1f39bb (diff) | |
download | rneovim-8e58d37f2e15ac8540377148e55ed08a039aadb6.tar.gz rneovim-8e58d37f2e15ac8540377148e55ed08a039aadb6.tar.bz2 rneovim-8e58d37f2e15ac8540377148e55ed08a039aadb6.zip |
refactor: remove redundant casts
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r-- | src/nvim/path.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c index 8cc824337c..f552f24495 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -995,7 +995,7 @@ static void uniquefy_paths(garray_T *gap, char *pattern) if (pattern[0] == '*' && pattern[1] == '*' && vim_ispathsep_nocolon(pattern[2]) && path_cutoff != NULL - && vim_regexec(®match, path_cutoff, (colnr_T)0) + && vim_regexec(®match, path_cutoff, 0) && is_unique(path_cutoff, gap, i)) { sort_again = true; memmove(path, path_cutoff, strlen(path_cutoff) + 1); @@ -1004,7 +1004,7 @@ static void uniquefy_paths(garray_T *gap, char *pattern) // unique path. We start at the end of the path. */ pathsep_p = path + len - 1; while (find_previous_pathsep(path, &pathsep_p)) { - if (vim_regexec(®match, pathsep_p + 1, (colnr_T)0) + if (vim_regexec(®match, pathsep_p + 1, 0) && is_unique(pathsep_p + 1, gap, i) && path_cutoff != NULL && pathsep_p + 1 >= path_cutoff) { sort_again = true; |