aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/os/env.c')
-rw-r--r--src/nvim/os/env.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c
index 5b1cb01976..8a81f6e928 100644
--- a/src/nvim/os/env.c
+++ b/src/nvim/os/env.c
@@ -586,9 +586,6 @@ void expand_env_esc(char *restrict srcp, char *restrict dst, int dstlen, bool es
bool copy_char;
bool mustfree; // var was allocated, need to free it later
bool at_start = true; // at start of a name
-#if defined(BACKSLASH_IN_FILENAME)
- char *const save_dst = dst;
-#endif
int prefix_len = (prefix == NULL) ? 0 : (int)strlen(prefix);
@@ -729,7 +726,7 @@ void expand_env_esc(char *restrict srcp, char *restrict dst, int dstlen, bool es
// with it, skip a character
if (after_pathsep(dst, dst + c)
#if defined(BACKSLASH_IN_FILENAME)
- && (dst == save_dst || dst[-1] != ':')
+ && dst[c - 1] != ':'
#endif
&& vim_ispathsep(*tail)) {
tail++;