summaryrefslogtreecommitdiff
path: root/src/misc1.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-30 11:38:57 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-30 11:38:57 +0100
commitef0a1d5ed3566b91143d30ae9de3240f47c6e282 (patch)
tree68189a9bfb7396bbad063b819cc937b71bb6e417 /src/misc1.c
parenta8bfa1727a370d659dc0ccc3f0fd1763b10b5457 (diff)
downloadvim-git-ef0a1d5ed3566b91143d30ae9de3240f47c6e282.tar.gz
patch 8.1.0662: needlessly searching for tilde in stringv8.1.0662
Problem: Needlessly searching for tilde in string. Solution: Only check the first character. (James McCoy, closes #3734)
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc1.c b/src/misc1.c
index 40d6f93c5..a55275100 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -4924,7 +4924,7 @@ home_replace(
homedir_env = NULL;
#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL)
- if (homedir_env != NULL && vim_strchr(homedir_env, '~') != NULL)
+ if (homedir_env != NULL && *homedir_env == '~')
{
int usedlen = 0;
int flen;