diff options
-rw-r--r-- | src/nvim/charset.c | 1 | ||||
-rw-r--r-- | src/nvim/ex_getln.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c index 7c8284a891..ae5da557d5 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -1910,6 +1910,7 @@ void backslash_halve(char_u *p) /// @return String with the number of backslashes halved. char_u* backslash_halve_save(char_u *p) { + // TODO(philix): simplify and improve backslash_halve_save algorithm char_u *res = vim_strsave(p); backslash_halve(res); return res; diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index ed6f8fc964..b507116ac3 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -3213,8 +3213,7 @@ static int showmatches(expand_T *xp, int wildmenu) exp_path = expand_env_save_opt(files_found[k], TRUE); halved_slash = backslash_halve_save( exp_path != NULL ? exp_path : files_found[k]); - j = os_isdir(halved_slash != NULL ? halved_slash - : files_found[k]); + j = os_isdir(halved_slash); free(exp_path); free(halved_slash); } else |