aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/env.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2018-12-30 10:05:12 -0500
committerGitHub <noreply@github.com>2018-12-30 10:05:12 -0500
commitfa5182489a660e672bac6ea78ba4eefcbba9d6eb (patch)
tree49e9543e293d159a165af201f0576ed8f0d507d4 /src/nvim/os/env.c
parentd442345729a497663b32ee0609c6b697567a4e10 (diff)
parent1e06c235b81089a0127aea278643e8d236168002 (diff)
downloadrneovim-fa5182489a660e672bac6ea78ba4eefcbba9d6eb.tar.gz
rneovim-fa5182489a660e672bac6ea78ba4eefcbba9d6eb.tar.bz2
rneovim-fa5182489a660e672bac6ea78ba4eefcbba9d6eb.zip
Merge pull request #9411 from jamessan/vim-8.1.0662
vim-patch:8.1.0662: needlessly searching for tilde in string
Diffstat (limited to 'src/nvim/os/env.c')
-rw-r--r--src/nvim/os/env.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c
index 2f90d0bc9e..eb4ea45ec1 100644
--- a/src/nvim/os/env.c
+++ b/src/nvim/os/env.c
@@ -779,7 +779,7 @@ size_t home_replace(const buf_T *const buf, const char_u *src,
char *homedir_env_mod = (char *)homedir_env;
bool must_free = false;
- if (homedir_env_mod != NULL && strchr(homedir_env_mod, '~') != NULL) {
+ if (homedir_env_mod != NULL && *homedir_env_mod == '~') {
must_free = true;
size_t usedlen = 0;
size_t flen = strlen(homedir_env_mod);